/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/ui/text.py

  • Committer: Martin Pool
  • Date: 2009-03-03 02:13:14 UTC
  • mto: This revision was merged to the branch mainline in revision 4074.
  • Revision ID: mbp@sourcefrog.net-20090303021314-l0syyc4sbv0r113j
Be more robust about pb updates when none are active

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    def _progress_updated(self, task):
92
92
        """A task has been updated and wants to be displayed.
93
93
        """
94
 
        if task != self._task_stack[-1]:
 
94
        if not self._task_stack:
 
95
            warnings.warn("%r updated but no tasks are active" %
 
96
                (task,))
 
97
        elif task != self._task_stack[-1]:
95
98
            warnings.warn("%r is not the top progress task %r" %
96
99
                (task, self._task_stack[-1]))
97
100
        self._progress_view.show_progress(task)