Skip to content

Commit

Permalink
[FIX] base_location_nuts: Prevent flake8 error for non-critical bare …
Browse files Browse the repository at this point in the history
…except. (OCA#506)
  • Loading branch information
NL66278 authored and kos94ok-3D committed Mar 17, 2021
1 parent a102c63 commit 41e74c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base_location_nuts/wizard/nuts_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def _mapping(self, node):
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)
Expand Down

0 comments on commit 41e74c1

Please sign in to comment.