From 7227a72112f85b053c1e274d052f40a8655bcfe8 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Mon, 15 Jan 2018 13:16:48 +0100 Subject: [PATCH] fonts: exit if not a single font was found --- brother_ql_web.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/brother_ql_web.py b/brother_ql_web.py index 73abab9..64fea4e 100755 --- a/brother_ql_web.py +++ b/brother_ql_web.py @@ -250,6 +250,9 @@ def main(): FONTS = get_fonts() if args.font_folder: FONTS.update(get_fonts(args.font_folder)) + if not FONTS: + sys.stderr.write("Not a single font was found on your system. Please install some or use the \"--font-folder\" argument.\n") + sys.exit(2) for font in DEFAULT_FONTS: try: