/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 breezy/progress.py

  • Committer: Vincent Ladeuil
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-01 05:46:59 UTC
  • mfrom: (6861.4.1 pb-context)
  • Revision ID: v.ladeuil+lp@free.fr-20180301054659-7fzum8cexsk421r3
Make progress bars context managers.

Merged from https://code.launchpad.net/~jelmer/brz/pb-context/+merge/339449

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
        else:
165
165
            self.ui_factory.clear_term()
166
166
 
 
167
    def __enter__(self):
 
168
        return self
 
169
 
 
170
    def __exit__(self, exc_type, exc_val, exc_tb):
 
171
        self.finished()
 
172
        return False
 
173
 
167
174
 
168
175
class DummyProgress(object):
169
176
    """Progress-bar standin that does nothing.