[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-836-g931cbb1

Andreas Beckmann debian at abeckmann.de
Thu Jun 21 11:36:37 UTC 2012


The following commit has been merged in the piatti branch:
commit 22165dcc2a33c947405869f788f2c18996d4c9da
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Wed Jun 20 21:43:17 2012 +0200

    p-s: check for misconfiguration earlier
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts-slave.py b/piuparts-slave.py
index e03dfdd..8090f96 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -326,6 +326,12 @@ class Section:
             self._error_wait_until = time.time() + 12 * 3600
             return 0
 
+        if not self._config["distro"] and (not self._config["upgrade-test-distros"] \
+                                           or not self._config["upgrade-test-distros"].split()):
+            logging.error("neither 'distro' nor 'upgrade-test-distros' configured")
+            self._error_wait_until = time.time() + 3600
+            return 0
+
         lock = open(os.path.join(self._slave_directory, "slave.lock"), "we")
         try:
             fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
@@ -385,11 +391,6 @@ class Section:
         if self._config["upgrade-test-distros"]:
             distros += self._config["upgrade-test-distros"].split()
 
-        if not distros:
-            logging.error("neither 'distro' nor 'upgrade-test-distros' configured")
-            self._error_wait_until = time.time() + 3600
-            return 0
-
         packages_files = {}
         for distro in distros:
             if distro not in packages_files:

-- 
piuparts git repository



More information about the Piuparts-commits mailing list