mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +00:00
[minor] replace 'raise e' with 'raise' for correct tracebacks
This commit is contained in:
@@ -37,7 +37,7 @@ def update_file_list(doctype, singles):
|
||||
except Exception, e:
|
||||
print webnotes.getTraceback()
|
||||
if (e.args and e.args[0]!=1054) or not e.args:
|
||||
raise e
|
||||
raise
|
||||
|
||||
def update_for_doc(doctype, doc):
|
||||
for filedata in doc.file_list.split("\n"):
|
||||
|
||||
@@ -10,4 +10,4 @@ def execute():
|
||||
webnotes.conn.sql("""update `tab%s` set file_list =
|
||||
replace(file_list, "-", "")""" % dt[0])
|
||||
except Exception, e:
|
||||
if e.args[0]!=1146: raise e
|
||||
if e.args[0]!=1146: raise
|
||||
@@ -37,7 +37,7 @@ def execute():
|
||||
except Exception, e:
|
||||
# if duplicate entry, then dont update
|
||||
if e[0]!=1062:
|
||||
raise e
|
||||
raise
|
||||
|
||||
|
||||
changed_keys = change_map.keys()
|
||||
@@ -62,5 +62,5 @@ def execute():
|
||||
|
||||
except Exception, e:
|
||||
if e[0]!=1146:
|
||||
raise e
|
||||
raise
|
||||
|
||||
@@ -25,4 +25,4 @@ def execute():
|
||||
webnotes.conn.sql("""update `tabPrice List` set buying_or_selling='Selling'
|
||||
where ifnull(buying_or_selling, '')='' """)
|
||||
else:
|
||||
raise e
|
||||
raise
|
||||
@@ -33,7 +33,7 @@ def execute():
|
||||
pass
|
||||
except Exception, e:
|
||||
if e.args[0] != 1062:
|
||||
raise e
|
||||
raise
|
||||
|
||||
webnotes.delete_doc("DocType", "Question")
|
||||
webnotes.delete_doc("DocType", "Answer")
|
||||
|
||||
@@ -10,6 +10,6 @@ def execute():
|
||||
webnotes.conn.sql("""alter table `tabStock Ledger Entry` add index posting_sort_index(posting_date, posting_time, name)""")
|
||||
webnotes.conn.commit()
|
||||
except Exception, e:
|
||||
if e.args[0]!=1061: raise e
|
||||
if e.args[0]!=1061: raise
|
||||
webnotes.conn.begin()
|
||||
|
||||
@@ -19,4 +19,4 @@ def execute():
|
||||
where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype)
|
||||
except MySQLdb.OperationalError, e:
|
||||
if e.args[0] != 1054:
|
||||
raise e
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user