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 +++++--- debian/changelog | 11 +++++++++++ python/apt_pkgmodule.cc | 2 -- 3 files changed, 16 insertions(+), 5 deletions(-) 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 = [] diff --git a/debian/changelog b/debian/changelog index 09df061d..f206ad0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,9 +5,20 @@ python-apt (0.7.4) UNRELEASED; urgency=low - support dictionary like access * python/apt_instmodule.cc: - added arCheckMember() + * aptsources/distro.py: + - throw NoDistroTemplateException if not distribution template + can be found -- Michael Vogt Mon, 30 Jul 2007 22:33:59 +0200 +python-apt (0.7.3.1) unstable; urgency=low + + * NMU + * Fix version to not use CPU and OS since it's not available on APT + anymore (closes: #435653, #435674) + + -- Otavio Salvador Thu, 02 Aug 2007 18:45:25 -0300 + python-apt (0.7.3) unstable; urgency=low * apt/package.py: diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index a0352d4e..15f7d238 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -483,8 +483,6 @@ extern "C" void initapt_pkg() // Version.. AddStr(Dict,"Version",pkgVersion); AddStr(Dict,"LibVersion",pkgLibVersion); - AddStr(Dict,"CPU",pkgCPU); - AddStr(Dict,"OS",pkgOS); AddStr(Dict,"Date",__DATE__); AddStr(Dict,"Time",__TIME__); -- cgit v1.2.3