diff options
author | jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> | 2008-09-25 19:49:38 +0000 |
---|---|---|
committer | jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> | 2008-09-25 19:49:38 +0000 |
commit | 716ee5de76b08f579ef861b1e81aae9d930ea222 (patch) | |
tree | 74c886fee9349feb2a9877c891e187a14d7cb857 /tko/parsers | |
parent | af37e3f0a5a4cc826ba5b282296925c01b9e7e18 (diff) |
Change the job keyval loading code to do a search up the filesystem
for the "real" job keyval file.
Risk: Medium
Visibility: Multi-machine server jobs will pull in all job attributes.
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@2197 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/parsers')
-rw-r--r-- | tko/parsers/version_0.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tko/parsers/version_0.py b/tko/parsers/version_0.py index 0d5c48c9..97de656b 100644 --- a/tko/parsers/version_0.py +++ b/tko/parsers/version_0.py @@ -10,13 +10,11 @@ class job(models.job): job_dict = job.load_from_dir(dir) super(job, self).__init__(dir, **job_dict) - @staticmethod - def load_from_dir(dir): - try: - keyval = common_utils.read_keyval(dir) - tko_utils.dprint(str(keyval)) - except Exception: - keyval = {} + + @classmethod + def load_from_dir(cls, dir): + keyval = cls.read_keyval(dir) + tko_utils.dprint(str(keyval)) user = keyval.get("user", None) label = keyval.get("label", None) |