Merge pull request #12705 from achillesrasquinha/12704

Fix for python 3 compatibility
This commit is contained in:
tundebabzy 2018-01-30 09:26:51 +01:00 committed by GitHub
commit df50a6f828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ def insert_record(records):
doc.update(r)
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