Python 3 compatibility syntax error fixes (#10519)

* Use Python 3 style print function

* Use 'Exception as e' instead of 'Exception, e'

* Unpack tuple arguments explicitly in instead of relying on auto unpacking

* Use consistent indentation

* Use 0 if stock_frozen_upto_days is None
This commit is contained in:
Aditya Hase
2017-08-28 18:17:36 +05:30
committed by Rushabh Mehta
parent 7ed4bfe7ee
commit 6ccb6562f1
43 changed files with 141 additions and 138 deletions

View File

@@ -1,5 +1,5 @@
## temp utility
from __future__ import print_function
import frappe
from erpnext.utilities.activation import get_level
from frappe.utils import cstr
@@ -12,7 +12,7 @@ def update_doctypes():
for f in dt.fields:
if f.fieldname == d.fieldname and f.fieldtype in ("Text", "Small Text"):
print f.parent, f.fieldname
print(f.parent, f.fieldname)
f.fieldtype = "Text Editor"
dt.save()
break