Merge pull request #16341 from alyf-de/remove-useless-pass

refactor: remove useless pass, log error
This commit is contained in:
mergify[bot] 2022-03-20 08:22:57 +00:00 committed by GitHub
commit 5c709b3750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View file

@ -253,8 +253,8 @@ class User(Document):
self.email_new_password(new_password)
except frappe.OutgoingEmailError:
print(frappe.get_traceback())
pass # email server not set, don't send email
# email server not set, don't send email
frappe.log_error(frappe.get_traceback())
@Document.hook
def validate_reset_password(self):

View file

@ -650,8 +650,6 @@ def extract_messages_from_code(code):
if isinstance(e, InvalidIncludePath):
frappe.clear_last_message()
pass
messages = []
pattern = r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,\s*(.)*?\s*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)"

View file

@ -227,7 +227,6 @@ class NestedSet(Document):
update_nsm(self)
except frappe.DoesNotExistError:
if self.flags.on_rollback:
pass
frappe.message_log.pop()
else:
raise