From 1625d6d2fb6f27d13a48ad524aaee094fbc13265 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 6 Jun 2019 19:32:36 +0200 Subject: [PATCH] Use ImportError instead of ModuleNotFoundError for py3.5 support issue7086 --- product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product.py b/product.py index a2caed51fb..4b18ce6b62 100644 --- a/product.py +++ b/product.py @@ -537,7 +537,7 @@ class ProductIdentifier(sequence_ordered(), ModelSQL, ModelView): try: module = import_module('stdnum.%s' % self.type) return module.compact(self.code) - except ModuleNotFoundError: + except ImportError: pass except stdnum.exceptions.ValidationError: pass