fix: Use ImportError instead of ModuleNotFoundError (#6797)

- ModuleNotFoundError is available in python 3.6
This commit is contained in:
Faris Ansari 2019-01-21 17:57:38 +05:30 committed by Aditya Hase
parent 6724b0fd26
commit 987a604749

View file

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