Show More
@@ -239,7 +239,10 b' threading.Thread(target=interrupt).start()' | |||
|
239 | 239 | |
|
240 | 240 | # Timeout if the interrupt doesn't happen: |
|
241 | 241 | def interrupt(): |
|
242 | try: | |
|
242 | 243 | time.sleep(2) |
|
244 | except KeyboardInterrupt: | |
|
245 | return | |
|
243 | 246 | _exit(7) |
|
244 | 247 | threading.Thread(target=interrupt, daemon=True).start() |
|
245 | 248 | |
@@ -248,9 +251,14 b' def main():' | |||
|
248 | 251 | |
|
249 | 252 | if __name__ == '__main__': |
|
250 | 253 | try: |
|
254 | print("Starting debugger...") | |
|
251 | 255 | main() |
|
256 | print("Debugger exited without error.") | |
|
252 | 257 | except KeyboardInterrupt: |
|
253 | print("PASSED") | |
|
258 | print("Caught KeyboardInterrupt, PASSED") | |
|
259 | except Exception as e: | |
|
260 | print("Got wrong exception...") | |
|
261 | raise e | |
|
254 | 262 | """ |
|
255 | 263 | |
|
256 | 264 |
General Comments 0
You need to be logged in to leave comments.
Login now