[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-782-gd639116

Andreas Beckmann debian at abeckmann.de
Mon Jun 18 21:15:06 UTC 2012


The following commit has been merged in the piatti branch:
commit 1fa9d61bb0cf6d45ebd3a852a140d863a8ba02db
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Wed Jun 13 14:13:17 2012 +0200

    lib/conf: add get_distro() method
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piupartslib/conf.py b/piupartslib/conf.py
index c00b136..e88d44c 100644
--- a/piupartslib/conf.py
+++ b/piupartslib/conf.py
@@ -58,4 +58,13 @@ class Config(UserDict.UserDict):
             return self["mirror"]
         return "http://cdn.debian.net/debian"
 
+    def get_distro(self):
+        if self["distro"] is not None:
+            return self["distro"]
+        if self["upgrade-test-distros"] is not None:
+            distros = self["upgrade-test-distros"].split()
+            if distros:
+                return distros[-1]
+        return None
+
 # vi:set et ts=4 sw=4 :

-- 
piuparts git repository



More information about the Piuparts-commits mailing list