diff options
-rwxr-xr-x | asciidoc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asciidoc.py b/asciidoc.py index 2d22c4d..7f058a2 100755 --- a/asciidoc.py +++ b/asciidoc.py @@ -6251,12 +6251,12 @@ def asciidoc(backend, doctype, confiles, infile, outfile, options): writer.close() finally: reader.closefile() - except KeyboardInterrupt: - raise - except Exception as e: + except BaseException as e: # Cleanup. if outfile and outfile != '<stdout>' and os.path.isfile(outfile): os.unlink(outfile) + if not isinstance(e, Exception): + raise # Build and print error description. msg = 'FAILED: ' if reader.cursor: |