Skip to content

Commit

Permalink
iteritems => items
Browse files Browse the repository at this point in the history
  • Loading branch information
alenz33 committed Apr 1, 2015
1 parent b6a76a2 commit 136851b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion conduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def addChainArgs(parser, chainName):
'''
chainDef = loadChainDefinition(chainName)

for paramName, paramDef in chainDef['parameters'].iteritems():
for paramName, paramDef in chainDef['parameters'].items():
flag = '--%s' % paramName
parser.add_argument(
flag,
Expand Down
6 changes: 3 additions & 3 deletions conduct/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _initLogger(self):
self.log = conduct.log.getChild(self.name, True)

def _applyParamValues(self, values):
for name, definition in self.parameters.iteritems():
for name, definition in self.parameters.items():
if name in values:
self.params[name] = values[name]
elif definition.default is not None:
Expand All @@ -76,7 +76,7 @@ def _loadChainDefinition(self):
self._createSteps()

def _createSteps(self):
for name, definition in self._chainDef['steps'].iteritems():
for name, definition in self._chainDef['steps'].items():
# name should be step:name or chain:name
entryType, entryName = definition[0].split(':')

Expand All @@ -93,7 +93,7 @@ def _createSteps(self):
self.steps[name] = Chain(entryName)

def _createReferencers(self, paramValues):
for paramName, paramValue in paramValues.iteritems():
for paramName, paramValue in paramValues.items():
if isinstance(paramValue, str) \
and re.match('.*?(\{(.*?)\})+.*?', paramValue):
paramValues[paramName] = Referencer(paramValue)
Expand Down
2 changes: 1 addition & 1 deletion conduct/loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
SECONDS_PER_DAY = 60 * 60 * 24

LOGLEVELS = {'debug': DEBUG, 'info': INFO, 'warning': WARNING, 'error': ERROR}
INVLOGLEVELS = {value : key for key, value in LOGLEVELS.iteritems()}
INVLOGLEVELS = {value : key for key, value in LOGLEVELS.items()}

class ConductLogger(Logger):
def getChild(self, suffix, ownDir=False):
Expand Down
2 changes: 1 addition & 1 deletion conduct/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __call__(self, val=None):
if not isinstance(val, dict):
raise ValueError('value needs to be a dict')
ret = {}
for k, v in val.iteritems():
for k, v in val.items():
ret[self.keyconv(k)] = self.valconv(v)
return ret

Expand Down
2 changes: 1 addition & 1 deletion doc/ext/paramdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def document_members(self, all_members=False):

if isinstance(self.object.parameters, property):
return ClassDocumenter.document_members(self, all_members)
for param, info in sorted(self.object.parameters.iteritems()):
for param, info in sorted(self.object.parameters.items()):
if info.classname is not None and info.classname != myclsname:
baseparaminfo.append((param, info))
continue
Expand Down

0 comments on commit 136851b

Please sign in to comment.