~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
669
669
            if not hasattr(e, 'errno'):
670
670
                raise
671
671
            if e.errno != errno.EPIPE:
672
 
                raise
 
672
                # Win32 raises IOError with errno=0 on a broken pipe
 
673
                if sys.platform != 'win32' or e.errno != 0:
 
674
                    raise
673
675
            pass
674
676
        except KeyboardInterrupt:
675
677
            pass
688
690
 
689
691
def run_bzr_catch_errors(argv):
690
692
    try:
691
 
        try:
692
 
            return run_bzr(argv)
693
 
        finally:
694
 
            # do this here inside the exception wrappers to catch EPIPE
695
 
            sys.stdout.flush()
 
693
        return run_bzr(argv)
 
694
        # do this here inside the exception wrappers to catch EPIPE
 
695
        sys.stdout.flush()
696
696
    except Exception, e:
697
697
        # used to handle AssertionError and KeyboardInterrupt
698
698
        # specially here, but hopefully they're handled ok by the logger now