fix: Use ImportError instead of ModuleNotFoundError (#6797)
- ModuleNotFoundError is available in python 3.6
This commit is contained in:
parent
6724b0fd26
commit
987a604749
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue