mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 19:32:34 +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:
committed by
Marc Bonnici
parent
c3ddb31d4d
commit
b3de85455a
@@ -76,7 +76,7 @@ class RunState(object):
|
||||
|
||||
@property
|
||||
def num_completed_jobs(self):
|
||||
return sum(1 for js in self.jobs.itervalues()
|
||||
return sum(1 for js in self.jobs.values()
|
||||
if js.status > Status.RUNNING)
|
||||
|
||||
def __init__(self):
|
||||
@@ -95,7 +95,7 @@ class RunState(object):
|
||||
|
||||
def get_status_counts(self):
|
||||
counter = Counter()
|
||||
for job_state in self.jobs.itervalues():
|
||||
for job_state in self.jobs.values():
|
||||
counter[job_state.status] += 1
|
||||
return counter
|
||||
|
||||
@@ -103,7 +103,7 @@ class RunState(object):
|
||||
return OrderedDict(
|
||||
status=str(self.status),
|
||||
timestamp=self.timestamp,
|
||||
jobs=[j.to_pod() for j in self.jobs.itervalues()],
|
||||
jobs=[j.to_pod() for j in self.jobs.values()],
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user