From 987a604749b5fce6bbd6dcdbc77cf9f943b26ca5 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 21 Jan 2019 17:57:38 +0530 Subject: [PATCH] fix: Use ImportError instead of ModuleNotFoundError (#6797) - ModuleNotFoundError is available in python 3.6 --- frappe/utils/print_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/print_format.py b/frappe/utils/print_format.py index ca6ff8c2d3..26f90e16f2 100644 --- a/frappe/utils/print_format.py +++ b/frappe/utils/print_format.py @@ -106,7 +106,7 @@ def print_by_server(doctype, name, print_format=None, doc=None, no_letterhead=0) print_settings = frappe.get_doc("Print Settings") try: import cups - except ModuleNotFoundError: + except ImportError: frappe.throw("You need to install pycups to use this feature!") return try: