diff options
Diffstat (limited to 'monitor/josef_mover.py')
| -rwxr-xr-x | monitor/josef_mover.py | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/monitor/josef_mover.py b/monitor/josef_mover.py index 511a156..5fb22da 100755 --- a/monitor/josef_mover.py +++ b/monitor/josef_mover.py @@ -36,8 +36,8 @@ def print_reply(rep, entry, precert): source = ctlogs[0] dests = [ctlogs[1]] -first = 21001 -last = 22000 +first = 153357 +last = 154357 entries = get_entries(source["url"], first, last)["entries"] @@ -45,23 +45,28 @@ entries = get_entries(source["url"], first, last)["entries"] for log in dests: for item in entries: - entry = extract_original_entry(item) - if entry[2]: - precert = True - else: - precert = False - submission = [] - - for e in entry[0]: - submission.append(base64.b64encode(e)) - - if precert: - res = add_prechain(log["url"], {"chain" : submission}) - else: - res = add_chain(log["url"], {"chain" : submission}) - - print_reply(res, entry, precert) - time.sleep(5) + try: + entry = extract_original_entry(item) + if entry[2]: + precert = True + else: + precert = False + submission = [] + + for e in entry[0]: + submission.append(base64.b64encode(e)) + + if precert: + res = add_prechain(log["url"], {"chain" : submission}) + else: + res = add_chain(log["url"], {"chain" : submission}) + + print_reply(res, entry, precert) + time.sleep(5) + except KeyboardInterrupt: + break + except: + print "FAILED!" |
