Skip to content

Commit

Permalink
Except only for KeyError and log the error
Browse files Browse the repository at this point in the history
  • Loading branch information
rbevansp committed Jul 21, 2022
1 parent 8c73a09 commit 6c96b56
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ingestion/functions/parsing/cuba/cuba.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,8 @@ def parse_cases(raw_data_file, source_id, source_url):
for centre in json_data[centre_type]:
hospital_map[centre] = json_data[centre_type][centre]['nombre'] + \
", " + json_data[centre_type][centre]['provincia']
except:
#key not found
pass
except KeyError:
logger.error(f"KeyError in Cuba parser")

# Get schema_version
try:
Expand Down

0 comments on commit 6c96b56

Please sign in to comment.