/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/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-27 11:27:12 UTC
  • mfrom: (4831.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20091127112712-52xu8dywjwc1utjs
(doxxx) Make bzr serve --quiet really quiet

Show diffs side-by-side

added added

removed removed

Lines of Context:
1836
1836
            os.chdir(working_dir)
1837
1837
 
1838
1838
        try:
1839
 
            result = self.apply_redirected(ui.ui_factory.stdin,
1840
 
                stdout, stderr,
1841
 
                bzrlib.commands.run_bzr_catch_user_errors,
1842
 
                args)
 
1839
            try:
 
1840
                result = self.apply_redirected(ui.ui_factory.stdin,
 
1841
                    stdout, stderr,
 
1842
                    bzrlib.commands.run_bzr_catch_user_errors,
 
1843
                    args)
 
1844
            except KeyboardInterrupt:
 
1845
                # Reraise KeyboardInterrupt with contents of redirected stdout
 
1846
                # and stderr as arguments, for tests which are interested in
 
1847
                # stdout and stderr and are expecting the exception.
 
1848
                out = stdout.getvalue()
 
1849
                err = stderr.getvalue()
 
1850
                if out:
 
1851
                    self.log('output:\n%r', out)
 
1852
                if err:
 
1853
                    self.log('errors:\n%r', err)
 
1854
                raise KeyboardInterrupt(out, err)
1843
1855
        finally:
1844
1856
            logger.removeHandler(handler)
1845
1857
            ui.ui_factory = old_ui_factory