Skip to content

Commit

Permalink
Merge pull request #24 from PandABlocks/python3-ipmi
Browse files Browse the repository at this point in the history
Make ipmi parsing work for Python3
  • Loading branch information
coretl committed Jan 30, 2020
2 parents 92089b2 + fcdf99b commit 2042a4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/i2c/ini_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get(self, name, default):
return default

def __iter__(self):
return self.__sections.itervalues()
return iter(self.__sections.values())

def emit(self, outfile = sys.stdout):
for section in self:
Expand All @@ -58,7 +58,7 @@ def __getitem__(self, key):
return self.__keys[key]

def __iter__(self):
return self.__keys.iteritems()
return iter(self.__keys.items())

def emit(self, outfile = sys.stdout):
print('[%s]' % self.name, file = outfile)
Expand Down
1 change: 1 addition & 0 deletions etc/i2c/parse_ipmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def next(self, lang_code = None):
result, self.ix = get_string(self.data, self.ix, lang_code)
return result

__next__ = next

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Parses the common header defined in [ISD] section 8.
Expand Down

0 comments on commit 2042a4f

Please sign in to comment.