~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Martin Pool
  • Date: 2009-03-12 07:09:28 UTC
  • mto: This revision was merged to the branch mainline in revision 4144.
  • Revision ID: mbp@sourcefrog.net-20090312070928-f110be8twil0w4ye
If one ProgressTask has no count, it passes through that of its child

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
        if self.current_cnt is not None and self.total_cnt:
118
118
            own_fraction = (float(self.current_cnt) + child_fraction) / self.total_cnt
119
119
        else:
120
 
            own_fraction = None
 
120
            # if this task has no estimation, it just passes on directly
 
121
            # whatever the child has measured...
 
122
            own_fraction = child_fraction
121
123
        if self._parent_task is None:
122
124
            return own_fraction
123
125
        else: