chore: Drop FileNotFoundError handling for PY2

This commit is contained in:
Gavin D'souza 2021-05-26 22:21:23 +05:30
parent 88ef41bc58
commit eca30667d2
2 changed files with 1 additions and 9 deletions

View file

@ -1,17 +1,9 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import sys
# BEWARE don't put anything in this file except exceptions
from werkzeug.exceptions import NotFound
if sys.version_info.major == 2:
class FileNotFoundError(Exception): pass
else:
from builtins import FileNotFoundError
class SiteNotSpecifiedError(Exception):
def __init__(self, *args, **kwargs):
self.message = "Please specify --site sitename"

View file

@ -15,7 +15,7 @@ from frappe.utils.password import delete_all_passwords_for
from frappe.model.naming import revert_series_if_last
from frappe.utils.global_search import delete_for_document
from frappe.desk.doctype.tag.tag import delete_tags_for_document
from frappe.exceptions import FileNotFoundError
doctypes_to_skip = ("Communication", "ToDo", "DocShare", "Email Unsubscribe", "Activity Log", "File",
"Version", "Document Follow", "Comment" , "View Log", "Tag Link", "Notification Log", "Email Queue")