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 edlopen committed May 15, 2024
1 parent 710506b commit 449cb1e
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 449cb1e

Please sign in to comment.