summaryrefslogtreecommitdiff
path: root/util/stats/profile.py
diff options
context:
space:
mode:
Diffstat (limited to 'util/stats/profile.py')
-rw-r--r--util/stats/profile.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/util/stats/profile.py b/util/stats/profile.py
index 151170280..f28c5867c 100644
--- a/util/stats/profile.py
+++ b/util/stats/profile.py
@@ -283,13 +283,16 @@ class Profile(object):
for cpu,data in cpus.iteritems():
yield run,cpu,data
- def get(self, job, stat):
- if job.system is None:
+ def get(self, job, stat, system=None):
+ if system is None and hasattr('system', job):
+ system = job.system
+
+ if system is None:
raise AttributeError, 'The job must have a system set'
- run = job.name
- cpu = '%s.run%d' % (job.system, self.cpu)
- data = self.getdata(run, cpu)
+ cpu = '%s.run%d' % (system, self.cpu)
+
+ data = self.getdata(str(job), cpu)
if not data:
return None