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,7 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from __future__ import print_function, unicode_literals
import frappe
from frappe import _
@@ -19,10 +19,10 @@ def after_install():
def check_setup_wizard_not_completed():
if frappe.db.get_default('desktop:home_page') == 'desktop':
print
print "ERPNext can only be installed on a fresh site where the setup wizard is not completed"
print "You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall"
print
print()
print("ERPNext can only be installed on a fresh site where the setup wizard is not completed")
print("You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall")
print()
return False
def set_single_defaults():