[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-56-gf60418b

Andreas Beckmann debian at abeckmann.de
Wed Jul 18 19:28:40 UTC 2012


The following commit has been merged in the develop branch:
commit 0071c8577c24643a15c12d44df5a04ef00ce018c
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Thu Jun 21 19:16:33 2012 +0200

    p-s: split _run() into _talk_to_master() and _process()
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts-slave.py b/piuparts-slave.py
index 1d27fb0..498221d 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -346,13 +346,13 @@ class Section:
                 logging.info("busy")
                 self._error_wait_until = time.time() + 900
             else:
-                return self._run()
+                return self._process()
             finally:
                 os.chdir(oldcwd)
         return 0
 
 
-    def _run(self):
+    def _talk_to_master(self):
         try:
             self._connect_to_master()
         except KeyboardInterrupt:
@@ -381,6 +381,13 @@ class Section:
         self._slave.get_status(self._config.section)
         self._slave.close()
 
+        return True
+
+
+    def _process(self):
+        if not self._talk_to_master():
+            return 0
+
         if not self._slave.get_reserved():
             self._idle_wait_until = time.time() + int(self._config["idle-sleep"])
             return 0

-- 
piuparts git repository



More information about the Piuparts-commits mailing list