diff --git a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py index b526d9410a13b1de5bf5f748c15ca0e431f743cc..b11721e3e895934c45d6fa6f8e9b3345e7582d2a 100644 --- a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py +++ b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # @file AthenaRootComps/python/ReadAthenaRoot.py # @purpose make the Athena framework read a set of ROOT files to emulate the @@ -52,7 +52,7 @@ def _configure(): evtloop = getattr(svcMgr, theApp.EventLoop) try: evtloop.EventPrintoutInterval = 10000 - except Exception, err: + except Exception as err: msg.info('disabling event loop heartbeat... [failed]') msg.info('performances might be sub-par... sorry.') pass diff --git a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py index 75dfec20855585a09af27b0a80a226509a818882..36536fac44c58a9d5179292ff95c0a29573d3809 100644 --- a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py +++ b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # @file AthenaRootComps/python/ReadAthenaxAOD.py # @purpose make the Athena framework read a set of xAOD files to emulate the @@ -50,7 +50,7 @@ def _configure(): evtloop = getattr(svcMgr, theApp.EventLoop) try: evtloop.EventPrintoutInterval = 10000 - except Exception, err: + except Exception as err: msg.info('disabling event loop heartbeat... [failed]') msg.info('performances might be sub-par... sorry.') pass diff --git a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py index 58d34c7466385aad63d0e9c7d3b2c1bd04ea1520..d59a60a21ae386aa7a84865b6bba0f878f4eee12 100644 --- a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py +++ b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # @file AthenaRootComps/python/ReadAthenaxAODHybrid.py # @purpose make the Athena framework read a set of xAOD files to emulate the @@ -61,7 +61,7 @@ def _configure(): evtloop = getattr(svcMgr, theApp.EventLoop) try: evtloop.EventPrintoutInterval = 10000 - except Exception, err: + except Exception as err: msg.info('disabling event loop heartbeat... [failed]') msg.info('performances might be sub-par... sorry.') pass diff --git a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper_seek.py b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper_seek.py index 91eaee880fac2aa95def1054103dbc908536f9b2..8491060bf0c2988a5c073c9bd31486c0b4377e68 100644 --- a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper_seek.py +++ b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper_seek.py @@ -20,7 +20,7 @@ else: job += arcc.Athena__RootAsciiDumperAlg ("rootdumper") import os, time -print 'attach now', os.getpid() +printfunc ('attach now', os.getpid()) time.sleep(10) theApp.initialize() diff --git a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py index 01a872fcd61a1ed815687e8eb8287fe2bb8e1cdd..b355beeacc3294acad276ba7b266006d044f04c6 100644 --- a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py +++ b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py @@ -76,8 +76,8 @@ class MyAlg( PyAthena.Alg ): if hasattr(v, 'at') and not isinstance(v, (basestring,)): o[i] = list(v) self.msg.info('%s: %r', br, o) - print >> self.fd, "%s: %r" % (br, o) - except Exception, err: + printfunc ("%s: %r" % (br, o), file=self.fd) + except Exception as err: self.msg.info(' --> err for [%s]: %s' % (br, err)) pass return StatusCode.Success