Ver código fonte

Replaced Python 2 print syntax with Python 3 syntax (#3838)

* Replaced Python 2 print syntax with Python 3 syntax

* Update utils.py
version-14
Aditya Hase 8 anos atrás
committed by Rushabh Mehta
pai
commit
62bb03ef6e
5 arquivos alterados com 8 adições e 8 exclusões
  1. +2
    -2
      frappe/core/doctype/user/user.py
  2. +2
    -2
      frappe/patches/v4_0/file_manager_hooks.py
  3. +2
    -1
      frappe/website/purifycss.py
  4. +0
    -1
      frappe/website/utils.py
  5. +2
    -2
      frappe/www/desk.py

+ 2
- 2
frappe/core/doctype/user/user.py Ver arquivo

@@ -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


+ 2
- 2
frappe/patches/v4_0/file_manager_hooks.py Ver arquivo

@@ -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



+ 2
- 1
frappe/website/purifycss.py Ver arquivo

@@ -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)

+ 0
- 1
frappe/website/utils.py Ver arquivo

@@ -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'))


+ 2
- 2
frappe/www/desk.py Ver arquivo

@@ -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()


Carregando…
Cancelar
Salvar