Skip to content
Snippets Groups Projects
Commit 0da14fbc authored by Andre Sailer's avatar Andre Sailer
Browse files

dddigi: fixing some cppyy.gbl.string occurences

parent f247c00b
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# ========================================================================== # ==========================================================================
from __future__ import absolute_import, unicode_literals from __future__ import absolute_import, unicode_literals
import cppyy
from dd4hep_base import * # noqa: F401, F403 from dd4hep_base import * # noqa: F401, F403
logger = None logger = None
...@@ -276,6 +277,8 @@ def _set(self, name, value): ...@@ -276,6 +277,8 @@ def _set(self, name, value):
import dd4hep as dd4hep import dd4hep as dd4hep
act = _get_action(self) act = _get_action(self)
nam = dd4hep.unicode_2_string(name) nam = dd4hep.unicode_2_string(name)
if isinstance(value, (list,)): # cppyy.gbl.string showing up for some reason
value = [x.decode('utf-8') if isinstance(x, cppyy.gbl.std.string) else x for x in value]
if isinstance(value, str): if isinstance(value, str):
val = dd4hep.unicode_2_string(value) val = dd4hep.unicode_2_string(value)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment