Skip to content

Commit

Permalink
Fix: log invalid record only instead of whole file
Browse files Browse the repository at this point in the history
close #138

In case of Registro.br issues, the whole file was logged.
With this fix, only the broken record is now dumped into the log
message.
  • Loading branch information
pierky committed Jul 15, 2024
1 parent eb4f4d3 commit 1843e83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pierky/arouteserver/registro_br_db_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def load_data(self):
except ValueError as e:
logging.warning(
"invalid record '{}': {}".format(
str(raw), str(e)
str(row), str(e)
)
)
continue
except ValueError as e:
except Exception as e:
msg = (
"An error occurred while processing the Registro.br Whois "
"database dump: {}".format(str(e))
Expand Down

0 comments on commit 1843e83

Please sign in to comment.