=== modified file 'fiveaday/bzr.py' --- fiveaday/bzr.py 2008-05-26 12:33:04 +0000 +++ fiveaday/bzr.py 2008-05-28 21:50:01 +0000 @@ -36,11 +36,13 @@ if not force: from bzrlib import branch b = branch.Branch.open(branch_dir()) - last_rev = b.repository.get_revision(b.last_revision()) - seconds_since_last_commit = time.time() - last_rev.timestamp - if seconds_since_last_commit < 3600 and last_rev.committer == b.get_config().username(): - print >> sys.stdout, _("Bugs have been added, but not committed yet (already committed %d minutes ago).") % (seconds_since_last_commit/60) - return 0 # This is no error + last_rev = b.last_revision() + if last_rev: + last_rev = b.repository.get_revision(last_rev) + seconds_since_last_commit = time.time() - last_rev.timestamp + if seconds_since_last_commit < 3600 and last_rev.committer == b.get_config().username(): + print >> sys.stdout, _("Bugs have been added, but not committed yet (already committed %d minutes ago).") % (seconds_since_last_commit/60) + return 0 # This is no error err = update_branch() if err: