Fix error handling if results dir does not exist
Make autotest_client check the python version.
Signed-off-by: Martin J. Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@481 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/autotest_client b/client/bin/autotest_client
index f184eba..faa34a8 100755
--- a/client/bin/autotest_client
+++ b/client/bin/autotest_client
@@ -1,4 +1,7 @@
#!/usr/bin/python
+from check_version import check_python_version
+check_python_version()
+
import sys, os, time
from subprocess import *
diff --git a/client/bin/job.py b/client/bin/job.py
index 473cc9b..22c3a79 100755
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -65,6 +65,9 @@
system('rm -rf ' + self.tmpdir)
os.mkdir(self.tmpdir)
+ if not os.path.exists(self.autodir + '/results'):
+ os.mkdir(self.autodir + '/results')
+
if os.path.exists(self.resultdir):
system('rm -rf ' + self.resultdir)
os.mkdir(self.resultdir)
@@ -376,7 +379,8 @@
myjob.complete(1)
except:
- myjob.harness.run_abort()
+ if myjob:
+ myjob.harness.run_abort()
# Ensure we cannot continue this job, it is in rictus.
if os.path.exists(state):
os.unlink(state)