[minor] moved patch handler import into respective methods
This commit is contained in:
parent
63b370865e
commit
0e01e5de9c
1 changed files with 4 additions and 2 deletions
6
wnf.py
6
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue