From 0e01e5de9cfc9a1db59e82f78ea393cc5a39d121 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Sat, 21 Sep 2013 13:09:19 +0530 Subject: [PATCH] [minor] moved patch handler import into respective methods --- wnf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wnf.py b/wnf.py index fc0f67717c..a9a012763d 100755 --- a/wnf.py +++ b/wnf.py @@ -349,8 +349,6 @@ def run(): except ImportError, e: conf = webnotes._dict({}) - from webnotes.db import Database - import webnotes.modules.patch_handler webnotes.print_messages = True # connect @@ -388,6 +386,8 @@ def run(): # patch elif options.patch_list: + import webnotes.modules.patch_handler + # clear log webnotes.modules.patch_handler.log_list = [] @@ -400,6 +400,8 @@ def run(): # reload elif options.reload_doc: + import webnotes.modules.patch_handler + webnotes.modules.patch_handler.reload_doc(\ {"module":options.reload_doc[0], "dt":options.reload_doc[1], "dn":options.reload_doc[2]}) print '\n'.join(webnotes.modules.patch_handler.log_list)