From 9fd1cb401a0de3b6566b54df54aff262f52c8988 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 10 Jan 2020 16:33:37 +0100 Subject: [PATCH] AthenaCommon: python 3 fixes Update workaround for Gaudi property taking argument for move to work with py3. Fixes drop-and-reload functionality. --- Control/AthenaCommon/python/ConfigurationShelve.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Control/AthenaCommon/python/ConfigurationShelve.py b/Control/AthenaCommon/python/ConfigurationShelve.py index 748b696fd0f..461bd058add 100644 --- a/Control/AthenaCommon/python/ConfigurationShelve.py +++ b/Control/AthenaCommon/python/ConfigurationShelve.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # @file: AthenaCommon/python/ConfigurationShelve.py # @author: Wim Lavrijsen (WLavrijsen@lbl.gov) @@ -308,7 +308,8 @@ def loadJobOptionsCatalogue( cfg_fname ): for n,v in six.iteritems(jocat[ client ]): # In Gaudi v28, the second argument of the ctor is passed by move, # which pyroot doesn't handle correctly. Do this as a workaround. - p = gaudi.StringProperty( n, '' ) + p = gaudi.StringProperty() + p.setName(n) try: p.fromString(v).ignore() except Exception: @@ -322,7 +323,8 @@ def loadJobOptionsCatalogue( cfg_fname ): svc = PyAthena.py_svc( client, createIf = False, iface='IProperty' ) for n,v in six.iteritems(jocfg[ client ]): # See comment above. - p = gaudi.StringProperty( n, '' ) + p = gaudi.StringProperty() + p.setName(n) p.fromString(v).ignore() svc.setProperty( p ) -- GitLab