Only write the .machines file when there's more than one host. The original code in the preamble did this ("if len(machines) > 1"). A recent change refactored the code and in the process simplified it to "if len(machines)". But this breaks the parser because it causes autoserv to write a .machines file in every individual machine directory for an async job, which confuses the parser.
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2341 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index eb24ad2..1d7b021 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -751,7 +751,7 @@
namespace = namespace.copy()
self._fill_server_control_namespace(namespace, protect=protect)
# TODO: Simplify and get rid of the special cases for only 1 machine.
- if len(self.machines):
+ if len(self.machines) > 1:
machines_text = '\n'.join(self.machines) + '\n'
# Only rewrite the file if it does not match our machine list.
try: