debian/bin/kconfig.py: Adjust for compatibility with Python 3
Use open() instead of file(). Use dict.items() instead of .iteritems(). Use collections.OrderedDict.items() instead of .iteritems().
This commit is contained in:
parent
f56a30a44d
commit
3d1b880497
|
@ -11,10 +11,10 @@ from debian_linux.kconfig import *
|
|||
def merge(output, configs, overrides):
|
||||
kconfig = KconfigFile()
|
||||
for c in configs:
|
||||
kconfig.read(file(c))
|
||||
for key, value in overrides.iteritems():
|
||||
kconfig.read(open(c))
|
||||
for key, value in overrides.items():
|
||||
kconfig.set(key, value)
|
||||
file(output, "w").write(str(kconfig))
|
||||
open(output, "w").write(str(kconfig))
|
||||
|
||||
|
||||
def opt_callback_dict(option, opt, value, parser):
|
||||
|
|
|
@ -87,5 +87,5 @@ class KconfigFile(OrderedDict):
|
|||
self[key] = entry
|
||||
|
||||
def str_iter(self):
|
||||
for key, value in self.iteritems():
|
||||
for key, value in self.items():
|
||||
yield str(value)
|
||||
|
|
Loading…
Reference in New Issue