Show More
@@ -120,11 +120,18 b' def dispatch(req):' | |||
|
120 | 120 | ret = None |
|
121 | 121 | try: |
|
122 | 122 | ret = _runcatch(req) |
|
123 | return ret | |
|
123 | except KeyboardInterrupt: | |
|
124 | try: | |
|
125 | req.ui.warn(_("interrupted!\n")) | |
|
126 | except IOError as inst: | |
|
127 | if inst.errno != errno.EPIPE: | |
|
128 | raise | |
|
129 | ret = -1 | |
|
124 | 130 | finally: |
|
125 | 131 | duration = time.time() - starttime |
|
126 | 132 | req.ui.log("commandfinish", "%s exited %s after %0.2f seconds\n", |
|
127 | 133 | msg, ret or 0, duration) |
|
134 | return ret | |
|
128 | 135 | |
|
129 | 136 | def _runcatch(req): |
|
130 | 137 | def catchterm(*args): |
@@ -313,10 +320,6 b' def _runcatch(req):' | |||
|
313 | 320 | else: |
|
314 | 321 | ui.warn(_("abort: %s\n") % inst.strerror) |
|
315 | 322 | except KeyboardInterrupt: |
|
316 | try: | |
|
317 | ui.warn(_("interrupted!\n")) | |
|
318 | except IOError as inst: | |
|
319 | if inst.errno != errno.EPIPE: | |
|
320 | 323 |
|
|
321 | 324 | except MemoryError: |
|
322 | 325 | ui.warn(_("abort: out of memory\n")) |
General Comments 0
You need to be logged in to leave comments.
Login now