diff --git a/DDG4/python/DDG4.py b/DDG4/python/DDG4.py index a496fff7630e125c8eef2ef26e764562523d0978..47a2e68ea0367d78a247b9fa2cbf7ccf0710ecf8 100644 --- a/DDG4/python/DDG4.py +++ b/DDG4/python/DDG4.py @@ -10,6 +10,7 @@ # ========================================================================== from __future__ import absolute_import, unicode_literals import logging +import cppyy from dd4hep_base import * # noqa: F403 import ddsix as six @@ -134,9 +135,11 @@ def _registerGlobalFilter(self, filter): # noqa: A002 def _evalProperty(data): """ Function necessary to extract real strings from the property value. - Strings may be embraced by quotes: '<value>' + Strings may be embraced by quotes: '<value>', or could be cppyy.gbl.std.string with extra "b''" """ try: + if isinstance(data, (cppyy.gbl.std.string, )): + return _evalProperty(data.decode('utf-8')) if isinstance(data, str): import ast return ast.literal_eval(data)