From ddf91759e3fabee1e0d61372247c4256758c387c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 3 Aug 2007 14:23:44 +0200 Subject: * aptsources/distro.py: - throw NoDistroTemplateException if not distribution template can be found * NMU * Fix version to not use CPU and OS since it's not available on APT anymore (closes: #435653, #435674) --- aptsources/distro.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'aptsources') diff --git a/aptsources/distro.py b/aptsources/distro.py index 22c86b27..debbb12a 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -31,6 +31,9 @@ import gettext def _(s): return gettext.dgettext("python-apt", s) +class NoDistroTemplateException(Exception): + pass + class Distribution: def __init__(self, id, codename, description, release): """ Container for distribution specific informations """ @@ -78,9 +81,8 @@ class Distribution: self.source_template = template break if self.source_template == None: - print "Error: could not find a distribution template" - # FIXME: will go away - only for debugging issues - sys.exit(1) + raise (NoDistroTemplateException, + "Error: could not find a distribution template") # find main and child sources media = [] -- cgit v1.2.3