Browse Source

[FIX] base_location_nuts: Prevent flake8 error for non-critical bare except. (#506)

pull/518/head
Ronald Portier 7 years ago
committed by Jairo Llopis
parent
commit
dcee932c57
  1. 5
      base_location_nuts/wizard/nuts_import.py

5
base_location_nuts/wizard/nuts_import.py

@ -97,7 +97,10 @@ class NutsImport(models.TransientModel):
if field_type == 'integer':
try:
value = int(value)
except:
except (ValueError, TypeError):
logger.warn(
"Value %s for field %s replaced by 0" %
(value, k))
value = 0
else:
logger.debug("xpath = '%s', not found" % field_xpath)

Loading…
Cancel
Save