From ce88ca42de22bc1a691f7d2914492ae536b18030 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 21 Jul 2018 13:01:23 +0200 Subject: [PATCH] python print migration CondCore/ESSources --- CondCore/ESSources/python/GlobalTag.py | 3 ++- CondCore/ESSources/test/python/load_from_globaltag_cfg.py | 5 +++-- .../ESSources/test/python/load_record_empty_source_cfg.py | 5 +++-- .../test/python/loadall_from_gt_empty_source_cfg.py | 5 +++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CondCore/ESSources/python/GlobalTag.py b/CondCore/ESSources/python/GlobalTag.py index 16579d67f71fc..b330212c35d38 100644 --- a/CondCore/ESSources/python/GlobalTag.py +++ b/CondCore/ESSources/python/GlobalTag.py @@ -1,3 +1,4 @@ +from __future__ import print_function import sys from Configuration.AlCa.autoCond import aliases @@ -54,7 +55,7 @@ def checkPrefix(self, inputGTParams): """ Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match or -1 in case of no match. """ if inputGTParams[0][0].find("_") == -1: - print "Invalid GT name. It does not contain an _, it cannot be used for replacements." + print("Invalid GT name. It does not contain an _, it cannot be used for replacements.") sys.exit(1) prefix = inputGTParams[0][0].split("_")[0] for i in range(0, len(self.gtParams)): diff --git a/CondCore/ESSources/test/python/load_from_globaltag_cfg.py b/CondCore/ESSources/test/python/load_from_globaltag_cfg.py index f543c8d471e65..4d00a4c98e142 100644 --- a/CondCore/ESSources/test/python/load_from_globaltag_cfg.py +++ b/CondCore/ESSources/test/python/load_from_globaltag_cfg.py @@ -1,3 +1,4 @@ +from __future__ import print_function import FWCore.ParameterSet.Config as cms process = cms.Process("TEST") @@ -33,8 +34,8 @@ process.GlobalTag.connect = cms.string(globalTag.connect()) process.GlobalTag.globaltag = globalTag.gt() -print "Final connection string =", process.GlobalTag.connect -print "Final globalTag =", process.GlobalTag.globaltag +print("Final connection string =", process.GlobalTag.connect) +print("Final globalTag =", process.GlobalTag.globaltag) # process.GlobalTag.connect = cms.string(connectString) diff --git a/CondCore/ESSources/test/python/load_record_empty_source_cfg.py b/CondCore/ESSources/test/python/load_record_empty_source_cfg.py index 22c96fae67bd7..231eda1f55008 100644 --- a/CondCore/ESSources/test/python/load_record_empty_source_cfg.py +++ b/CondCore/ESSources/test/python/load_record_empty_source_cfg.py @@ -1,3 +1,4 @@ +from __future__ import print_function import time import FWCore.ParameterSet.Config as cms @@ -161,6 +162,6 @@ process.schedule_().append( process.esout ) for name, module in six.iteritems(process.es_sources_()): - print "ESModules> provider:%s '%s'" % ( name, module.type_() ) + print("ESModules> provider:%s '%s'" % ( name, module.type_() )) for name, module in six.iteritems(process.es_producers_()): - print "ESModules> provider:%s '%s'" % ( name, module.type_() ) + print("ESModules> provider:%s '%s'" % ( name, module.type_() )) diff --git a/CondCore/ESSources/test/python/loadall_from_gt_empty_source_cfg.py b/CondCore/ESSources/test/python/loadall_from_gt_empty_source_cfg.py index 430516878be90..15a7569597fd4 100644 --- a/CondCore/ESSources/test/python/loadall_from_gt_empty_source_cfg.py +++ b/CondCore/ESSources/test/python/loadall_from_gt_empty_source_cfg.py @@ -1,3 +1,4 @@ +from __future__ import print_function import time import FWCore.ParameterSet.Config as cms @@ -157,6 +158,6 @@ process.schedule_().append( process.esout ) for name, module in six.iteritems(process.es_sources_()): - print "ESModules> provider:%s '%s'" % ( name, module.type_() ) + print("ESModules> provider:%s '%s'" % ( name, module.type_() )) for name, module in six.iteritems(process.es_producers_()): - print "ESModules> provider:%s '%s'" % ( name, module.type_() ) + print("ESModules> provider:%s '%s'" % ( name, module.type_() ))