about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-11-03 20:56:53 -0500
committerStarfall <us@starfall.systems>2023-12-05 10:01:03 -0600
commit2e12dee61f8f03b86dd029875eb8606864f35eb0 (patch)
tree527b2f9ea9b0ef8382fc4860b5d9720adf4238cd
parentd16632e8b5e7e314021a86d2c80855380d122810 (diff)
strike: fix error when exclusions is not defined
-rwxr-xr-xstrike.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/strike.py b/strike.py
index 9f04a20..1afd0bf 100755
--- a/strike.py
+++ b/strike.py
@@ -47,7 +47,8 @@ def main():
 
     input_dir = basedir/config['Input']['directory']
 
-    exclusions = config['Input']['excludes'].splitlines()
+    try: exclusions = config['Input']['excludes'].splitlines()
+    except KeyError: exclusions = {}
 
     default_template = basedir/config['Templates']['default']
     template = default_template.read_text()