Browse Source

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

14.0
Ronald Portier 7 years ago
committed by Andrii Skrypka
parent
commit
41e74c14bf
  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