[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.42-59-gc28b2f1

Andreas Beckmann debian at abeckmann.de
Sat Mar 10 09:08:49 UTC 2012


The following commit has been merged in the develop branch:
commit 2cbcd2104fc7f3292fbc2d0b277f2faec2ed9854
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Mon Mar 5 17:57:36 2012 +0100

    skip section after master failure
    
    Do not abort if connection to master failed, just skip the section
    and retry later.
    The slave is intended to be a long running process and should not
    abort on temporary network problems (e.g. master being unable to
    fetch a package list).
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index d2b7886..b4887e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,7 @@ piuparts (0.44) UNRELEASED; urgency=low
       but allow only one instance per section.
   * piuparts-slave.py:
     - Do not leak the logfile file descriptor to piuparts.
+    - Do not abort if connection to master failed, just skip the section.
   * piuparts-report.py:
     - Add link to the list of untestable logs.
     - Add more known problem reports: forgotten alternatives, warnings in
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 1fd2dd9..9fe7777 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -302,7 +302,13 @@ class Section:
         return ret
 
     def _run(self):
-        self._slave.connect_to_master(self._log_file)
+        try:
+            self._slave.connect_to_master(self._log_file)
+        except KeyboardInterrupt:
+            raise
+        except:
+            logging.error("connection to master failed")
+            return 0
 
         for logdir in ["pass", "fail", "untestable"]:
             for basename in os.listdir(logdir):

-- 
piuparts git repository



More information about the Piuparts-commits mailing list