Use ImportError instead of ModuleNotFoundError for py3.5 support

issue7086
This commit is contained in:
Sergi Almacellas Abellana committed 2019-06-06 19:32:36 +02:00
1 parent 4dad405f84
commit 1625d6d2fb
1 file changed
+1 -1
+1 -1
View File
@@ -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