[Piuparts-commits] [piuparts] 01/09: p-s: reload section config earlier

Holger Levsen holger at moszumanska.debian.org
Sat May 16 14:51:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 5c74e8d9f26ec0e2b75ebc1fddf45de594d007aa
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon May 4 19:05:01 2015 +0200

    p-s: reload section config earlier
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 piuparts-slave.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/piuparts-slave.py b/piuparts-slave.py
index ab26c8c..32a4870 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -460,6 +460,16 @@ class Section:
 
         self._throttle_if_overloaded()
 
+        self._config = Config(section=self._config.section, defaults_section="global")
+        try:
+            self._config.read(CONFIG_FILE)
+        except MissingSection:
+            logging.info("unknown section " + self._config.section)
+            self._error_wait_until = time.time() + 3600
+            return 0
+        self._distro_config = piupartslib.conf.DistroConfig(
+                DISTRO_CONFIG_FILE, self._config["mirror"])
+
         if interrupted or got_sighup:
             do_processing = False
 
@@ -475,16 +485,6 @@ class Section:
         logging.info("%s section %s (precedence=%d)"
                      % (action, self._config.section, self.precedence()))
 
-        self._config = Config(section=self._config.section, defaults_section="global")
-        try:
-            self._config.read(CONFIG_FILE)
-        except MissingSection:
-            logging.info("unknown")
-            self._error_wait_until = time.time() + 3600
-            return 0
-        self._distro_config = piupartslib.conf.DistroConfig(
-            DISTRO_CONFIG_FILE, self._config["mirror"])
-
         if int(self._config["max-reserved"]) == 0:
             logging.info("disabled")
             self._error_wait_until = time.time() + 12 * 3600

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list