Show More
@@ -90,7 +90,7 b' def _runcatch(ui, args):' | |||
|
90 | 90 | else: |
|
91 | 91 | raise |
|
92 | 92 | except socket.error, inst: |
|
93 | ui.warn(_("abort: %s\n") % inst[-1]) | |
|
93 | ui.warn(_("abort: %s\n") % inst.args[-1]) | |
|
94 | 94 | except IOError, inst: |
|
95 | 95 | if hasattr(inst, "code"): |
|
96 | 96 | ui.warn(_("abort: %s\n") % inst) |
@@ -100,7 +100,7 b' def _runcatch(ui, args):' | |||
|
100 | 100 | except: # it might be anything, for example a string |
|
101 | 101 | reason = inst.reason |
|
102 | 102 | ui.warn(_("abort: error: %s\n") % reason) |
|
103 | elif hasattr(inst, "args") and inst[0] == errno.EPIPE: | |
|
103 | elif hasattr(inst, "args") and inst.args[0] == errno.EPIPE: | |
|
104 | 104 | if ui.debugflag: |
|
105 | 105 | ui.warn(_("broken pipe\n")) |
|
106 | 106 | elif getattr(inst, "strerror", None): |
@@ -116,13 +116,13 b' def _runcatch(ui, args):' | |||
|
116 | 116 | else: |
|
117 | 117 | ui.warn(_("abort: %s\n") % inst.strerror) |
|
118 | 118 | except util.UnexpectedOutput, inst: |
|
119 | ui.warn(_("abort: %s") % inst[0]) | |
|
120 | if not isinstance(inst[1], basestring): | |
|
121 | ui.warn(" %r\n" % (inst[1],)) | |
|
122 | elif not inst[1]: | |
|
119 | ui.warn(_("abort: %s") % inst.args[0]) | |
|
120 | if not isinstance(inst.args[1], basestring): | |
|
121 | ui.warn(" %r\n" % (inst.args[1],)) | |
|
122 | elif not inst.args[1]: | |
|
123 | 123 | ui.warn(_(" empty string\n")) |
|
124 | 124 | else: |
|
125 | ui.warn("\n%r\n" % util.ellipsis(inst[1])) | |
|
125 | ui.warn("\n%r\n" % util.ellipsis(inst.args[1])) | |
|
126 | 126 | except ImportError, inst: |
|
127 | 127 | m = str(inst).split()[-1] |
|
128 | 128 | ui.warn(_("abort: could not import module %s!\n") % m) |
General Comments 0
You need to be logged in to leave comments.
Login now