Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
ensure the date of the announcement is in the database
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Dec 19, 2012
1 parent c278d7a commit f73a088
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/ip_asn_history/api.py
Expand Up @@ -92,6 +92,10 @@ def run(announce_date = None):
p = routing_db.pipeline(False)
if announce_date is None:
announce_date = default_announce_date
elif not routing_db.sismember('imported_dates', announce_date):
announce_date = default_announce_date
if not skip_exception:
raise Exception("unknown date")
[p.hget(k, announce_date) for k in keys]
return p.execute()

Expand Down

0 comments on commit f73a088

Please sign in to comment.