]> git.armaanb.net Git - lightcards.git/commitdiff
Compress error exit
authorArmaan Bhojwani <me@armaanb.net>
Tue, 9 Feb 2021 01:48:34 +0000 (20:48 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Tue, 9 Feb 2021 01:48:34 +0000 (20:48 -0500)
lightcards/parse.py

index 0b4ecc1b2bdd172ad5cad07ca40e0205af07296d..f9ca3ee15afc6648ced65bd8d9436e911c19d4cf 100644 (file)
@@ -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):