diff options
author | Josef Gustafsson <josef.gson@gmail.com> | 2015-09-28 13:24:08 +0200 |
---|---|---|
committer | Josef Gustafsson <josef.gson@gmail.com> | 2015-09-28 13:24:08 +0200 |
commit | 4849a5487be2ed1a565b82c7a227fca1cec099ef (patch) | |
tree | 9b13619e17dd22e56225c430c1b77b6f11c9ea12 /monitor/josef_monitor.py | |
parent | df4d69358f7ec6115d835cabe47e749aa04ba6ff (diff) |
debugging
Diffstat (limited to 'monitor/josef_monitor.py')
-rwxr-xr-x | monitor/josef_monitor.py | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py index f33039a..6c189ca 100755 --- a/monitor/josef_monitor.py +++ b/monitor/josef_monitor.py @@ -133,11 +133,12 @@ class ctlog: self.log("Failed to fetch STH. " +str(e)) return - try: - check_sth_signature(self.url, new_sth, base64.b64decode(self.key)) - except: - self.log("ERROR: Could not verify STH signature") - print "ERROR: Could not verify STH signature from " + self.url + # try: + check_sth_signature(self.url, new_sth, base64.b64decode(self.key)) + # check_sth_signature(self.url, new_sth, None) + # except: + # self.log("ERROR: Could not verify STH signature") + # print "ERROR: Could not verify STH signature from " + self.url sth_time = datetime.datetime.fromtimestamp(new_sth['timestamp'] / 1000, UTC()).strftime("%Y-%m-%d %H:%M:%S") if new_sth["timestamp"] != self.sth["timestamp"]: @@ -443,17 +444,17 @@ def main(args): open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict)) # Something went horribly wrong! - except Exception, err: - print Exception, err - for log in logs: - log.save() - - # Save info about monitored domains - domain_dict = [] - if len(monitored_domains) > 0: - for md in monitored_domains: - domain_dict.append(md.to_dict()) - open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict)) + # except Exception, err: + # print Exception, err + # for log in logs: + # log.save() + + # # Save info about monitored domains + # domain_dict = [] + # if len(monitored_domains) > 0: + # for md in monitored_domains: + # domain_dict.append(md.to_dict()) + # open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict)) |