Skip to content

Commit

Permalink
Make ipmi parsing work for Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Jan 30, 2020
1 parent 92089b2 commit fcdf99b
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 fcdf99b

Please sign in to comment.