[minor] [fix] plugin patch

This commit is contained in:
Anand Doshi 2013-10-31 19:05:38 +05:30
parent f64dfa1d46
commit 7944ea3067

View File

@ -21,8 +21,12 @@ def execute():
for name, dt, script in webnotes.conn.sql("""select name, dt, script from `tabCustom Script`
where script_type='Server'"""):
if script.strip():
try:
script = indent_using_tabs(script)
make_custom_server_script_file(dt, script)
except IOError, e:
if "already exists" not in repr(e):
raise
def indent_using_tabs(script):
for line in script.split("\n"):