equal
deleted
inserted
replaced
148 |
148 |
149 sys.stderr.write('instance %s not %s: %s\n' % ( |
149 sys.stderr.write('instance %s not %s: %s\n' % ( |
150 appid, self.actionverb, ex)) |
150 appid, self.actionverb, ex)) |
151 status = 8 |
151 status = 8 |
152 |
152 |
153 except (KeyboardInterrupt, SystemExit): |
153 except (KeyboardInterrupt, SystemExit) as ex: |
154 sys.stderr.write('%s aborted\n' % self.name) |
154 sys.stderr.write('%s aborted\n' % self.name) |
155 status = 2 # specific error code |
155 if isinstance(ex, KeyboardInterrupt): |
|
156 status = 2 # specific error code |
|
157 else: |
|
158 status = ex.code |
156 |
159 |
157 if status != 0 and self.config.pdb: |
160 if status != 0 and self.config.pdb: |
158 exception_type, exception, traceback_ = sys.exc_info() |
161 exception_type, exception, traceback_ = sys.exc_info() |
159 pdb = get_pdb() |
162 pdb = get_pdb() |
160 pdb.post_mortem(traceback_) |
163 pdb.post_mortem(traceback_) |