Skip to content
Snippets Groups Projects
Commit e734fe8f authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Drop a Python 2 compatibility hack and fix handling of bool properties in GaudiPython

parent 17830b25
No related branches found
No related tags found
1 merge request!1507Drop a Python 2 compatibility hack and fix handling of bool properties in GaudiPython
Pipeline #6361590 passed
......@@ -55,10 +55,6 @@ with warnings.catch_warnings():
warnings.simplefilter("ignore")
import cppyy
if sys.version_info >= (3,):
# Python 2 compatibility
long = int
if ROOT6WorkAroundEnabled("ROOT-5478"):
# Trigger the loading of GaudiKernelDict
cppyy.gbl.DataObject
......@@ -316,8 +312,6 @@ class iProperty(object):
value = str(value.toStringProperty())
elif hasattr(value, "toString"):
value = str(value.toString())
elif isinstance(value, long):
value = "%d" % value # prevent pending 'L'
else:
value = str(value)
......@@ -979,8 +973,6 @@ class AppMgr(iService):
v = v.__resolve__()
if isinstance(v, str):
v = repr(v) # need double quotes
if isinstance(v, long):
v = "%d" % v # prevent pending 'L'
gbl.GaudiPython.Helpers.setProperty(
self._svcloc, ".".join([n, p]), str(v)
)
......
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