diff --git a/etc/i2c/ini_file.py b/etc/i2c/ini_file.py index e50fb86a6..25f651256 100644 --- a/etc/i2c/ini_file.py +++ b/etc/i2c/ini_file.py @@ -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: @@ -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) diff --git a/etc/i2c/parse_ipmi.py b/etc/i2c/parse_ipmi.py index 333c36600..5d2b5b02f 100644 --- a/etc/i2c/parse_ipmi.py +++ b/etc/i2c/parse_ipmi.py @@ -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.