From 8528d0d61fc46563b4d8bc05d7f7054ac1da0dcf Mon Sep 17 00:00:00 2001
From: Marko Petric <marko.petric@cern.ch>
Date: Tue, 1 Oct 2019 18:52:47 +0200
Subject: [PATCH] fix conversion unicode to str

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

diff --git a/DDG4/python/DDG4.py b/DDG4/python/DDG4.py
index 2fafba330..fce9ba3bd 100644
--- a/DDG4/python/DDG4.py
+++ b/DDG4/python/DDG4.py
@@ -144,7 +144,7 @@ def _getKernelProperty(self, name):
 
 
 def _setKernelProperty(self, name, value):
-  if Interface.setPropertyKernel(self.get(), name, str(value)):
+  if Interface.setPropertyKernel(self.get(), str(name), str(value)):
     return
   msg = 'Geant4Kernel::SetProperty [Unhandled]: Cannot set Kernel.' + name + ' = ' + str(value)
   raise KeyError(msg)
@@ -297,7 +297,7 @@ def _set(self, name, value):
   a = Interface.toAction(self)
   if isinstance(value, list):
     value = [str(x) for x in value]
-  if Interface.setProperty(a, name, str(value)):
+  if Interface.setProperty(a, str(name), str(value)):
     return
   msg = 'Geant4Action::SetProperty [Unhandled]: Cannot set ' + a.name() + '.' + name + ' = ' + str(value)
   raise KeyError(msg)
-- 
GitLab