From 34c7dde3ed30a72e6f926697b5fc0edb0bf87349 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 4 Apr 2017 19:52:25 +0100 Subject: [PATCH] Handle keyboard interrupt --- md_pdf/cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/md_pdf/cli.py b/md_pdf/cli.py index 38ab70f..9eea044 100644 --- a/md_pdf/cli.py +++ b/md_pdf/cli.py @@ -25,4 +25,7 @@ def cli(): except BaseException as e: logging.error(str(e)) return 1 + except KeyboardInterrupt: + logging.error("Aborted.") + return 1 return 0