[minor] moved patch handler import into respective methods

This commit is contained in:
Anand Doshi 2013-09-21 13:09:19 +05:30
parent 63b370865e
commit 0e01e5de9c

6
wnf.py
View file

@ -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)