Add a little check to see if packaging is actually being used. If it is don't 
pass on exceptions raised when trying to setup packaging for the job instead 
log them as an error.

Signed-off-by: Scott Zawalski <[email protected]>

--- autotest/server/autotest.py 2010-01-11 15:32:34.000000000 -0800
+++ autotest/server/autotest.py 2010-01-11 20:44:43.000000000 -0800
@@ -358,6 +358,7 @@
         prologue_lines = []
 
         # If the packaging system is being used, add the repository list.
+        repos = None
         try:
             c = global_config.global_config
             repos = c.get_config_value("PACKAGES", 'fetch_location', type=list)
@@ -366,7 +367,9 @@
                                              repo_urls=repos)
             prologue_lines.append('job.add_repository(%s)\n' % repos)
         except global_config.ConfigError, e:
-            pass
+            # If repos is defined packaging is enabled so log the error
+            if repos:
+                logging.error(e)
 
         # on full-size installs, turn on any profilers the server is using
         if not atrun.background:
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to