summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmonitor/josef_monitor.py35
1 files changed, 20 insertions, 15 deletions
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py
index 7dbd3c6..4b506e8 100755
--- a/monitor/josef_monitor.py
+++ b/monitor/josef_monitor.py
@@ -73,22 +73,27 @@ class ctlog:
if self.build:
start_size = self.entries
- try:
- while self.entries < self.sth["tree_size"]:
- tmp_size = self.entries
+ # try:
+ while self.entries < self.sth["tree_size"]:
+ tmp_size = self.entries
+ try:
self.subtree, self.entries = self.fetch_and_increment_subtree(self.entries, self.sth["tree_size"] -1, self.url, self.subtree)
- if tmp_size != self.entries:
- self.log("Got entries " + str(tmp_size) + " to " \
- + str(self.entries -1 ) + " of " + str(self.sth["tree_size"]-1))
-
- if self.entries != start_size:
- if verify_subtree(self.sth, self.subtree, self.url):
- 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))
+ except Exception, e:
+ print ERROR_STR + "Failed fetch and increment for " + self.name
+ self.log(ERROR_STR + "Failed fetch and increment tree. Error: " + str(e))
+
+ if tmp_size != self.entries:
+ self.log("Got entries " + str(tmp_size) + " to " \
+ + str(self.entries -1 ) + " of " + str(self.sth["tree_size"]-1))
+
+ if self.entries != start_size:
+ if verify_subtree(self.sth, self.subtree, self.url):
+ 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 = []