Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

Commit

Permalink
Make Python 3 compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Houseknecht committed May 22, 2017
1 parent 8a6ba9d commit 5bf5dc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions container/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ def ordereddict_to_list(config):
# If configuration top-level key is an orderedict, convert to list of tuples, providing a
# means to preserve key order. Call prior to encoding a config dict.
result = {}
for key, value in config.iteritems():
for key, value in iteritems(config):
if isinstance(value, yaml.compat.ordereddict):
result[key] = value.items()
result[key] = list(value.items())
else:
result[key] = value
return result
Expand All @@ -282,7 +282,7 @@ def list_to_ordereddict(config):
# If configuration top-level key is a list, convert it to an ordereddict.
# Call post decoding of a config dict.
result = {}
for key, value in config.iteritems():
for key, value in iteritems(config):
if isinstance(value, list):
result[key] = yaml.compat.ordereddict(value)
else:
Expand Down

0 comments on commit 5bf5dc3

Please sign in to comment.