/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-18 16:02:36 UTC
  • mto: This revision was merged to the branch mainline in revision 4018.
  • Revision ID: john@arbash-meinel.com-20090218160236-vjuspv4igqlijq7y
Get a pb.tick() to work after calling pb.update()

Calling pb.tick() does an update with current_cnt = None.
This often is fine, as long as you haven't called update() before
with a total_count. Once total_count is set, then there were
code paths that didn't handle missing current_count.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
 
108
108
    def _overall_completion_fraction(self, child_fraction=0.0):
109
109
        """Return fractional completion of this task and its parents
110
 
        
 
110
 
111
111
        Returns None if no completion can be computed."""
112
 
        if self.total_cnt:
 
112
        if self.current_cnt is not None and self.total_cnt:
113
113
            own_fraction = (float(self.current_cnt) + child_fraction) / self.total_cnt
114
114
        else:
115
115
            own_fraction = None