##// END OF EJS Templates
dispatch: handle IndexErrors
Dan Villiom Podlaski Christiansen -
r14096:dea93484 default
parent child Browse files
Show More
@@ -133,7 +133,8 b' def _runcatch(ui, args):'
133 elif hasattr(inst, "reason"):
133 elif hasattr(inst, "reason"):
134 try: # usually it is in the form (errno, strerror)
134 try: # usually it is in the form (errno, strerror)
135 reason = inst.reason.args[1]
135 reason = inst.reason.args[1]
136 except AttributeError: # it might be anything, for example a string
136 except (AttributeError, IndexError):
137 # it might be anything, for example a string
137 reason = inst.reason
138 reason = inst.reason
138 ui.warn(_("abort: error: %s\n") % reason)
139 ui.warn(_("abort: error: %s\n") % reason)
139 elif hasattr(inst, "args") and inst.args[0] == errno.EPIPE:
140 elif hasattr(inst, "args") and inst.args[0] == errno.EPIPE:
General Comments 0
You need to be logged in to leave comments. Login now