diff options
Diffstat (limited to 'monitor/josef_monitor.py')
| -rwxr-xr-x | monitor/josef_monitor.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py index 4b8b721..23ba147 100755 --- a/monitor/josef_monitor.py +++ b/monitor/josef_monitor.py @@ -78,9 +78,11 @@ class ctlog: tmp_cert_data = [] for item in entries: tmp_data = check_domain(item, url) + entry_hash = get_leaf_hash(base64.b64decode(item["leaf_input"])) if tmp_data: + tmp_data["leaf_hash"] = base64.b64encode(entry_hash) tmp_cert_data.append(tmp_data) - new_leafs.append(get_leaf_hash(base64.b64decode(item["leaf_input"]))) + new_leafs.append(entry_hash) if DB_PATH: self.log("Adding to database...") db_add_certs(DB_PATH, tmp_cert_data) @@ -360,11 +362,10 @@ def main(args): for log in logs: log.save() - except: - # Unreachable... usually. - print "FATAL ERROR! Saving state and terminating!" - for log in logs: - log.save() + # except Exception, err: + # print Exception, err + # for log in logs: + # log.save() |
