From baeb098601d62fe1dab3a9718cc6d09cf4610838 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Wed, 28 Jun 2023 21:00:56 -0500
Subject: [PATCH] fix: get for unknown key in dict

---
 containers/jug/setup_detectors.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/containers/jug/setup_detectors.py b/containers/jug/setup_detectors.py
index d9a84e357..3592f295c 100755
--- a/containers/jug/setup_detectors.py
+++ b/containers/jug/setup_detectors.py
@@ -98,14 +98,14 @@ if __name__ == '__main__':
             print(' '.join(cmd))
             subprocess.check_call(' '.join(cmd), shell=True)
             ## patches
-            if cfg['patches']:
+            if cfg.get('patches'):
                 for patch in cfg['patches']:
                     cmd = ['curl -L {patch} | patch -p1 -d/tmp/det']
                     print(' '.join(cmd))
                     subprocess.check_call(' '.join(cmd), shell=True)
             ## build
             cxxflags = ''
-            if cfg['cxxflags']:
+            if cfg.get('cxxflags'):
                 cxxflags = cfg['cxxflags']
             cmd = [
                 'cmake -B /tmp/build -S /tmp/det -DCMAKE_CXX_STANDARD=17',
-- 
GitLab