Skip to content
Snippets Groups Projects
Commit 89cdc2b5 authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

AthenaConfiguration: python3 fix

Fix references to func_name/func_code for python3.
parent f027f528
No related branches found
No related tags found
No related merge requests found
Pipeline #837962 passed
......@@ -239,7 +239,7 @@ class AthConfigFlags(object):
print("%-15.15s : %30s : %s" % ("Category","Generator name", "Defined in" ))
for name,gen in sorted(six.iteritems(self._dynaflags)):
print("%-15.15s : %30s : %s" %
(name, gen.func_name, '/'.join(gen.func_code.co_filename.split('/')[-2:])))
(name, gen.__name__, '/'.join(six.get_function_code(gen).co_filename.split('/')[-2:])))
def initAll(self): #Mostly a self-test method
......
......@@ -15,7 +15,7 @@ import ast
import collections
import six
from UnifyProperties import unifySet
from AthenaConfiguration.UnifyProperties import unifySet
class ConfigurationError(RuntimeError):
pass
......@@ -138,7 +138,7 @@ class ComponentAccumulator(object):
parent += newseq
algsByName = findAllAlgorithmsByName(newseq)
for name, existingAlgs in algsByName.iteritems():
for name, existingAlgs in six.iteritems(algsByName):
startingIndex = 0
if name not in self._algorithms:
firstAlg, parent, idx = existingAlgs[0]
......@@ -402,7 +402,7 @@ class ComponentAccumulator(object):
else:
self._msg.debug(" Merging sequence %s to a sequence %s", c.name(), dest.name() )
algorithmsByName = findAllAlgorithmsByName(c)
for name, existingAlgs in algorithmsByName.iteritems():
for name, existingAlgs in six.iteritems(algorithmsByName):
startingIndex = 0
if name not in self._algorithms:
firstAlg, parent, idx = existingAlgs[0]
......@@ -436,7 +436,7 @@ class ComponentAccumulator(object):
mergeSequences(destSeq,other._sequence)
# Additional checking and updating other accumulator's algorithms list
for name, alg in other._algorithms.iteritems():
for name, alg in six.iteritems(other._algorithms):
if name not in self._algorithms:
raise ConfigurationError('Error in merging. Algorithm {} missing in destination accumulator'.format(name))
other._algorithms[name] = self._algorithms[name]
......
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