Making compatible with Python 2.4

This commit is contained in:
Michael J. Pedersen 2009-07-08 14:14:52 -05:00
parent 6522072485
commit 4d78fd5dab

View File

@ -436,7 +436,10 @@ class GitHandler(object):
commits = [commit for commit in commits if not commit in self._map_git]
# import each of the commits, oldest first
total = len(commits)
magnitude = int(math.log(total, 10)) + 1 if total else 1
if total:
magnitude = int(math.log(total, 10)) + 1
else:
magnitude = 1
for i, csha in enumerate(commits):
if i%100 == 0:
self.ui.status(_("at: %*d/%d\n") % (magnitude, i, total))