From ddc9c9451cc55b4aa8869963439a48a8f1977a3c Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Mon, 8 Feb 2021 20:48:34 -0500 Subject: [PATCH] Compress error exit --- lightcards/parse.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lightcards/parse.py b/lightcards/parse.py index 0b4ecc1..f9ca3ee 100644 --- a/lightcards/parse.py +++ b/lightcards/parse.py @@ -13,8 +13,7 @@ def md2html(file): try: return markdown.markdown(open(file, "r").read(), extensions=["tables"]) except FileNotFoundError: - print(f'lightcards: "{file}": No such file or directory') - exit(1) + sys.exit(f'lightcards: "{file}": No such file or directory') def parse_html(html): -- 2.39.2