diff --git a/Control/AthenaCommon/python/JobProperties.py b/Control/AthenaCommon/python/JobProperties.py index e26059c7e083a6f813d00001a9a76066841c9c2a..4a6805b9e973e5660297652accd66d71568eff03 100755 --- a/Control/AthenaCommon/python/JobProperties.py +++ b/Control/AthenaCommon/python/JobProperties.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: JobProperties/python/JobProperties.py @@ -551,6 +551,8 @@ class JobPropertyContainer (object): module=__import__(module_name,globals(),locals(),\ ['JobProperties']) except ImportError: + import traceback + traceback.print_exc() self._log.error(" import_JobProperties: No module named %s", module_name) return None diff --git a/Control/AthenaCommon/python/PhysicalConstants.py b/Control/AthenaCommon/python/PhysicalConstants.py index ae29fb01eb6533e07ab9df5040247b02be049d1c..3b16529de3715a2b54669117bdfbee3eae99784f 100755 --- a/Control/AthenaCommon/python/PhysicalConstants.py +++ b/Control/AthenaCommon/python/PhysicalConstants.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/share/PhysicalConstants.py # Author: Wim Lavrijsen (LBNL, WLavrijsen@lbl.gov) @@ -43,7 +43,7 @@ from __future__ import print_function -from SystemOfUnits import henry, eplus, MeV, joule, s, m, kelvin, atmosphere, g, mg, cm3, mole +from .SystemOfUnits import henry, eplus, MeV, joule, s, m, kelvin, atmosphere, g, mg, cm3, mole # # diff --git a/Control/AthenaCommon/share/MemTraceInclude.py b/Control/AthenaCommon/share/MemTraceInclude.py index 44c8c5f6099eb1d1875371f37b2f482b9424a660..d9fb0f7a90e5f17bf9898fad186486b091d60829 100755 --- a/Control/AthenaCommon/share/MemTraceInclude.py +++ b/Control/AthenaCommon/share/MemTraceInclude.py @@ -1,10 +1,11 @@ import string +import six from AthenaCommon.Include import Include class MemTraceInclude( Include ): def __init__( self, org ): Include.__init__( self, org._show ) - for name, value in org.__dict__.iteritems(): + for name, value in six.iteritems (org.__dict__): setattr (self, name, value) import AthenaCommon.Logging as L self.msg = L.logging.getLogger('Athena') @@ -15,8 +16,8 @@ class MemTraceInclude( Include ): from sys import platform if platform != 'darwin' : pid = os.getpid() - statm = string.split( open( '/proc/%d/statm' % pid, 'r' ).readlines()[0] ) - stat = string.split( open( '/proc/%d/stat' % pid, 'r' ).readlines()[0] ) + statm = open( '/proc/%d/statm' % pid, 'r' ).readlines()[0].split() + stat = open( '/proc/%d/stat' % pid, 'r' ).readlines()[0].split() self.msg.info( 'VSIZE = %8.3f MB, SIZE = %8.3f MB, RSS = %8.3f MB',