[minor] fix in patch

This commit is contained in:
Anand Doshi 2013-11-04 15:31:00 +05:30
parent 3673a25176
commit 4bfaaf33aa
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,8 @@ from __future__ import unicode_literals
import webnotes, os
def execute():
import shutil
webnotes.reload_doc("core", "doctype", "doctype")
tables = webnotes.conn.sql_list("show tables")
@ -16,7 +18,7 @@ def execute():
path = os.path.join(get_base_path(), "app", "setup", "doctype", "for_territory")
if os.path.exists(path):
os.system("rm -rf {path}".format(path=path))
shutil.rmtree(path)
if webnotes.conn.exists("DocType", "For Territory"):
webnotes.delete_doc("DocType", "For Territory")

View File

@ -5,9 +5,10 @@ from __future__ import unicode_literals
import webnotes, os
def execute():
import shutil
from webnotes.utils import get_base_path
for dt in ("item_price", "price_list"):
path = os.path.join(get_base_path(), "app", "setup", "doctype", dt)
if os.path.exists(path):
os.system("rm -rf {path}".format(path=path))
shutil.rmtree(path)