Replaced Python 2 print syntax with Python 3 syntax (#3838)
* Replaced Python 2 print syntax with Python 3 syntax * Update utils.py
This commit is contained in:
parent
16a9bdfd31
commit
62bb03ef6e
5 changed files with 8 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# MIT License. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import unicode_literals, print_function
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import cint, has_gravatar, format_datetime, now_datetime, get_formatted_email
|
||||
|
|
@ -191,7 +191,7 @@ class User(Document):
|
|||
self.email_new_password(new_password)
|
||||
|
||||
except frappe.OutgoingEmailError:
|
||||
print frappe.get_traceback()
|
||||
print(frappe.get_traceback())
|
||||
pass # email server not set, don't send email
|
||||
|
||||
@Document.hook
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# MIT License. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import unicode_literals, print_function
|
||||
|
||||
import frappe
|
||||
import os
|
||||
|
|
@ -25,7 +25,7 @@ def execute():
|
|||
_file_name, content = get_file(name)
|
||||
b.content_hash = get_content_hash(content)
|
||||
except IOError:
|
||||
print 'Warning: Error processing ', name
|
||||
print('Warning: Error processing ', name)
|
||||
_file_name = old_file_name
|
||||
b.content_hash = None
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ sUpdate source and target apps below and run from CLI
|
|||
|
||||
'''
|
||||
|
||||
from __future__ import print_function
|
||||
import frappe, re, os
|
||||
|
||||
source = frappe.get_app_path('frappe_theme', 'public', 'less', 'frappe_theme.less')
|
||||
|
|
@ -39,4 +40,4 @@ def purifycss():
|
|||
classes.remove(c)
|
||||
|
||||
for c in sorted(classes):
|
||||
print c
|
||||
print(c)
|
||||
|
|
|
|||
|
|
@ -302,7 +302,6 @@ def add_missing_headers():
|
|||
else:
|
||||
fname = fname[:-3]
|
||||
h = fname.replace('_', ' ').replace('-', ' ').title()
|
||||
print h
|
||||
content = '# {0}\n\n'.format(h) + content
|
||||
f.write(content.encode('utf-8'))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# MIT License. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import unicode_literals, print_function
|
||||
|
||||
no_sitemap = 1
|
||||
no_cache = 1
|
||||
|
|
@ -23,7 +23,7 @@ def get_context(context):
|
|||
boot = frappe.sessions.get()
|
||||
except Exception as e:
|
||||
boot = frappe._dict(status='failed', error = str(e))
|
||||
print frappe.get_traceback()
|
||||
print(frappe.get_traceback())
|
||||
|
||||
# this needs commit
|
||||
csrf_token = frappe.sessions.get_csrf_token()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue