~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-02 04:35:02 UTC
  • Revision ID: mbp@sourcefrog.net-20050502043502-d526ff7dd4bd6624
- better error message for Ctrl-c

Show diffs side-by-side

added added

removed removed

Lines of Context:
1146
1146
            if str(e):
1147
1147
                msg += ': ' + str(e)
1148
1148
            _report_exception(e, msg)
 
1149
            return 2
 
1150
        except KeyboardInterrupt, e:
 
1151
            _report_exception(e, 'interrupted', quiet=True)
 
1152
            return 2
1149
1153
        except Exception, e:
1150
1154
            quiet = False
1151
1155
            if isinstance(e, IOError) and e.errno == errno.EPIPE:
1154
1158
            else:
1155
1159
                msg = str(e).rstrip('\n')
1156
1160
            _report_exception(e, msg, quiet)
1157
 
            return 1
 
1161
            return 2
1158
1162
    finally:
1159
1163
        bzrlib.trace.close_trace()
1160
1164