Summary: Fixing further breakage found using the -N flag of autoserv

Found more places of the code that were breaking autoserv due to the -N
flag. Try to fix the breakages.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2956 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/remote.py b/server/hosts/remote.py
index 4958f48..2f037a9 100644
--- a/server/hosts/remote.py
+++ b/server/hosts/remote.py
@@ -224,7 +224,12 @@
             logging.info("%s is back up, collecting crash info", self.hostname)
 
         # find a directory to put the crashinfo into
-        if self.job:
+        try:
+            self.job.resultsdir
+        except AttributeError:
+            self.job.resultsdir = None
+
+        if self.job.resultsdir:
             infodir = self.job.resultdir
         else:
             infodir = os.path.abspath(os.getcwd())
@@ -273,6 +278,8 @@
 
 
         # collect any uncollected logs we see (for this host)
+        if not self.job.uncollected_log_file:
+            self.job.uncollected_log_file = ''
         if self.job and os.path.exists(self.job.uncollected_log_file):
             try:
                 logs = pickle.load(open(self.job.uncollected_log_file))