[Piuparts-devel] Bug#668863: Make piuparts-slave.py default to sid

Dave Steele dsteele at gmail.com
Sun Apr 15 05:56:22 UTC 2012


Package: piuparts
Version: 0.43
Severity: minor
Tags: patch

The following branch defines a patch which will cause
piuparts-slave-py to default to 'sid' if no 'distro' is defined.

    git at github.com:davesteele/piuparts.git - branch slave-default-distro

Without the patch, Section.run() terminates with an unhandled
exception, due to a reference the unassigned variable 'distro' (line
389), if the 'distro' configuration parameter is not defined.

This matches the behavior of piuparts, which defaults to 'sid'.

---------------------------------------------------------------------------


>From a6e3195346119bb61072358fa5d46c3e99394ac2 Mon Sep 17 00:00:00 2001
From: David Steele <dsteele at gmail.com>
Date: Sun, 15 Apr 2012 01:05:26 -0400
Subject: [PATCH] piuparts-slave.py defaults to 'sid' if no distro defined
 Otherwise, Section.run() will terminate on an unassigned
 variable reference for 'distro'.   This matches the
 behavior of piuparts, which defaults to sid.   The
 alternative is to make an undefined distro an explicit
 error.

---
 piuparts-slave.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/piuparts-slave.py b/piuparts-slave.py
index 75b6f76..7bb0e88 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -374,7 +374,7 @@ class Section:
         if self._config["distro"]:
             distros = [self._config["distro"]]
         else:
-            distros = []
+            distros = ['sid']

         if self._config["upgrade-test-distros"]:
             distros += self._config["upgrade-test-distros"].split()
-- 
1.7.9.5





More information about the Piuparts-devel mailing list