diff options
-rwxr-xr-x | monitor/josef_monitor.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py index b130404..f7017fa 100755 --- a/monitor/josef_monitor.py +++ b/monitor/josef_monitor.py @@ -73,9 +73,16 @@ class ctlog: if self.build: start_size = self.entries + # try: while self.entries < self.sth["tree_size"]: tmp_size = self.entries - self.subtree, self.entries = self.fetch_and_increment_subtree(self.entries, self.sth["tree_size"] -1, self.url, self.subtree) + try: + self.subtree, self.entries = self.fetch_and_increment_subtree(self.entries, self.sth["tree_size"] -1, self.url, self.subtree) + except Exception, e: + print ERROR_STR + "Failed fetch and increment for " + self.name + self.log(ERROR_STR + "Failed fetch and increment tree. Current Size: " + str(self.entries) + " Sth: " + str(self.sth) + " Error: " + str(e)) + return + if tmp_size != self.entries: self.log("Got entries " + str(tmp_size) + " to " \ + str(self.entries -1 ) + " of " + str(self.sth["tree_size"]-1)) @@ -85,6 +92,9 @@ class ctlog: pass else: self.log(ERROR_STR + "Failed to verify newly built subtree!") + # except Exception, e: + # print "Failed incremental build for " + self.name + # self.log(ERROR_STR + "Failed incremental build. Error: " + str(e)) def fetch_and_increment_subtree(self, first, last, url, subtree =[[]]): new_leafs = [] |