From 92bc22b70ee724e78f3a115570e7b815a9f5db97 Mon Sep 17 00:00:00 2001 From: Alex Huszagh Date: Sat, 30 Apr 2022 17:15:41 -0500 Subject: [PATCH] Allow optional stylesheets in extensions. --- configure.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 31565ce..fa717d5 100644 --- a/configure.py +++ b/configure.py @@ -95,8 +95,13 @@ def load_json(path): def read_template_dir(directory): '''Read the template data from a directory''' + # Make the stylesheet template optional. + stylesheet = '' + stylesheet_path = f'{directory}/stylesheet.qss.in' + if os.path.exists(stylesheet_path): + stylesheet = open(f'{directory}/stylesheet.qss.in').read() data = { - 'stylesheet': open(f'{directory}/stylesheet.qss.in').read(), + 'stylesheet': stylesheet, 'icons': [], } if os.path.exists(f'{directory}/icons.json'):