##// END OF EJS Templates
progress: add try/finally to make the diffs for the next commit more readable...
Solomon Matthews -
r23905:8b5b963b default
parent child Browse files
Show More
@@ -229,6 +229,7 class progbar(object):
229
229
230 def progress(self, topic, pos, item='', unit='', total=None):
230 def progress(self, topic, pos, item='', unit='', total=None):
231 now = time.time()
231 now = time.time()
232 try:
232 if pos is None:
233 if pos is None:
233 self.starttimes.pop(topic, None)
234 self.starttimes.pop(topic, None)
234 self.startvals.pop(topic, None)
235 self.startvals.pop(topic, None)
@@ -262,6 +263,8 class progbar(object):
262 or now - self.lastprint >= self.changedelay):
263 or now - self.lastprint >= self.changedelay):
263 self.lastprint = now
264 self.lastprint = now
264 self.show(now, topic, *self.topicstates[topic])
265 self.show(now, topic, *self.topicstates[topic])
266 finally:
267 pass
265
268
266 _singleton = None
269 _singleton = None
267
270
General Comments 0
You need to be logged in to leave comments. Login now