summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-08-03 21:14:02 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-08-03 21:14:02 +0200
commitbdbe31287e41c11b40924a0d662722b395bddf73 (patch)
treeb862cd8ddbc63ba2e9cf20ec11d6549554a1e4e1
parent8e754c53c26e9c05af92df25f89046aa6da1f4c7 (diff)
parentddf91759e3fabee1e0d61372247c4256758c387c (diff)
downloadpython-apt-bdbe31287e41c11b40924a0d662722b395bddf73.tar.gz
* 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)
-rw-r--r--aptsources/distro.py8
-rw-r--r--debian/changelog11
-rw-r--r--python/apt_pkgmodule.cc2
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 698e9528..dee8c660 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,9 +13,20 @@ python-apt (0.7.3ubuntu1) gutsy; urgency=low
- added arCheckMember()
* build with latest python-distutils-extra (thanks
to doko for notifiying about the problem)
+ * aptsources/distro.py:
+ - throw NoDistroTemplateException if not distribution template
+ can be found
-- Michael Vogt <michael.vogt@ubuntu.com> Tue, 31 Jul 2007 13:40:04 +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 <otavio@debian.org> 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__);