From f7129c8ad9f3060e7aea780d39949f29327263ca Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Sat, 3 Feb 2024 20:08:52 -0600
Subject: [PATCH] fix: placate flake8

---
 DDG4/python/DDSim/Helper/Action.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/DDG4/python/DDSim/Helper/Action.py b/DDG4/python/DDSim/Helper/Action.py
index dc7dbf34f..4afcedb81 100644
--- a/DDG4/python/DDSim/Helper/Action.py
+++ b/DDG4/python/DDSim/Helper/Action.py
@@ -123,7 +123,6 @@ class Action(ConfigHelper):
   def calorimeterSDTypes(self, val):
     self._calorimeterSDTypes = ConfigHelper.makeList(val)
 
-
   @staticmethod
   def makeListOfDictFromJSON(val):
     if isinstance(val, str):
@@ -131,7 +130,7 @@ class Action(ConfigHelper):
       import json
       try:
         val = json.loads(val)
-      except:
+      except ValueError as e:
         val = tuple(val.split(","))
     if isinstance(val, tuple):
       # assumes: ( "Geant4TestEventAction", {"Property_int": 10} )
@@ -141,7 +140,7 @@ class Action(ConfigHelper):
     if isinstance(val, dict):
       # assumes: { "name": "Geant4TestEventAction", "parameter": {"Property_int": 10} }
       # creates: [ { "name": "Geant4TestEventAction", "parameter": {"Property_int": 10} } ]
-      val = [ val ]
+      val = [val]
     if isinstance(val, list):
       # assumes: [ { "name": "Geant4TestEventAction", "parameter": {"Property_int": 10} } ]
       return val
-- 
GitLab