From c63f90014edc02dab1b8fc221320a5f925026f11 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Mon, 6 May 2024 12:42:45 +0200
Subject: [PATCH] DDG4: eval all properties to avoid cppyy.gbl.string with
 bytes

---
 DDG4/python/DDG4.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/DDG4/python/DDG4.py b/DDG4/python/DDG4.py
index 69b39075b..41007834e 100644
--- a/DDG4/python/DDG4.py
+++ b/DDG4/python/DDG4.py
@@ -304,11 +304,11 @@ def _get(self, name):
   a = Interface.toAction(self)
   ret = Interface.getProperty(a, name)
   if ret.status > 0:
-    return ret.data
+    return _evalProperty(ret.data)
   elif hasattr(self.action, name):
-    return getattr(self.action, name)
+    return _evalProperty(getattr(self.action, name))
   elif hasattr(a, name):
-    return getattr(a, name)
+    return _evalProperty(getattr(a, name))
   msg = 'Geant4Action::GetProperty [Unhandled]: Cannot access property ' + a.name() + '.' + name
   raise KeyError(msg)
 
-- 
GitLab