Skip to content

Commit

Permalink
Update logger
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanDeveloper committed Feb 2, 2024
1 parent 7f699d3 commit 209edcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ flow_event:
keys:
- country.names.en
# Additional configurations
# - location
- location
# - city
# - traits
# - postal
Expand Down
4 changes: 2 additions & 2 deletions heidpi/heiDPI_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def heidpi_flow_processing(config_dict: dict, json_dict: dict):
del current_data
else:
try:
if not keys in json_dict["src_geoip2_city"]:
if not keys in response:
raise geoip2.errors.AddressNotFoundError(f"Error in key: {keys}")
json_dict["src_geoip2_city"][keys] = response[keys]
except geoip2.errors.AddressNotFoundError:
Expand Down Expand Up @@ -112,7 +112,7 @@ def heidpi_flow_processing(config_dict: dict, json_dict: dict):
del current_data
else:
try:
if not keys in json_dict["dst_geoip2_city"]:
if not keys in response:
raise geoip2.errors.AddressNotFoundError(f"Error in key: {keys}")
json_dict["dst_geoip2_city"][keys] = response[keys]
except Exception as e:
Expand Down

0 comments on commit 209edcc

Please sign in to comment.