Fix a regression from the big job refactoring. The refactoring
introduced a piece of code in job.run that now depends on
job.control being a valid file (even though the new spec explicitly
defines it as being optional). The original code dealt with this
case (job.run with control=None, job.control=None) by defaulting
to an empty control file, so we just need to handle that case again.
Risk: Low
Visibility: Fixes a regression that shows up when running a
control-file-less job (e.g. cleanup with -C).
Signed-off-by: John Admanski <[email protected]>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3948 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index eb0ce28..073aa7b 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -416,7 +416,10 @@
namespace = namespace.copy()
machines = self.machines
if control is None:
- control = self._load_control_file(self.control)
+ if self.control is None:
+ control = ''
+ else:
+ control = self._load_control_file(self.control)
if control_file_dir is None:
control_file_dir = self.resultdir