1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-04 12:22:41 +01:00

Add support for Python 3

Add support for running under Python 3, while maintaining compatibility
with Python 2.

See http://python-future.org/compatible_idioms.html for more details
behind these changes.
This commit is contained in:
Sergei Trofimov
2018-05-30 13:58:49 +01:00
committed by Marc Bonnici
parent c3ddb31d4d
commit b3de85455a
53 changed files with 377 additions and 384 deletions

View File

@@ -10,7 +10,7 @@ def cpuinfo_from_pod(pod):
cpuinfo.sections = pod['cpuinfo']
lines = []
for section in cpuinfo.sections:
for key, value in section.iteritems():
for key, value in section.items():
line = '{}: {}'.format(key, value)
lines.append(line)
lines.append('')
@@ -35,7 +35,7 @@ def kernel_config_from_pod(pod):
config = KernelConfig('')
config._config = pod['kernel_config']
lines = []
for key, value in config._config.iteritems():
for key, value in config._config.items():
if value == 'n':
lines.append('# {} is not set'.format(key))
else: