old style exception, raise --> new style for Python 3 (#10082)

* old style raise --> raise() for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style exception --> new style for Python 3

* old style raise --> raise() for Python 3

* old style raise --> raise() for Python 3

* old style exception, raise --> new style for Python 3
This commit is contained in:
cclauss
2017-07-27 07:08:35 +02:00
committed by Rushabh Mehta
parent c67bf5026e
commit 6848708377
13 changed files with 18 additions and 18 deletions

View File

@@ -233,10 +233,10 @@ def install(country=None):
try:
doc.insert(ignore_permissions=True)
except frappe.DuplicateEntryError, e:
except frappe.DuplicateEntryError as e:
# pass DuplicateEntryError and continue
if e.args and e.args[0]==doc.doctype and e.args[1]==doc.name:
# make sure DuplicateEntryError is for the exact same doc and not a related doc
pass
else:
raise
raise