[minor] replace 'raise e' with 'raise' for correct tracebacks

This commit is contained in:
Anand Doshi 2013-11-12 17:28:17 +05:30
parent 4f642e7670
commit 5f73a980b5
9 changed files with 12 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -168,7 +168,7 @@ def _make_customer(source_name, ignore_permissions=False):
customer.insert()
return customer
else:
raise e
raise
except webnotes.MandatoryError:
from webnotes.utils import get_url_to_form
webnotes.throw(_("Before proceeding, please create Customer from Lead") + \

View File

@ -52,7 +52,7 @@ class DocType:
inc_email.password = self.doc.support_password
except AttributeError, e:
webnotes.msgprint(err_msg)
raise e
raise
pop_mb = POP3Mailbox(inc_email)
@ -61,7 +61,7 @@ class DocType:
except _socket.error, e:
# Invalid mail server -- due to refusing connection
webnotes.msgprint('Invalid POP3 Mail Server. Please rectify and try again.')
raise e
raise
except poplib.error_proto, e:
webnotes.msgprint('Invalid User Name or Support Password. Please rectify and try again.')
raise e
raise