summaryrefslogtreecommitdiff
path: root/aptsources
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 /aptsources
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)
Diffstat (limited to 'aptsources')
-rw-r--r--aptsources/distro.py8
1 files changed, 5 insertions, 3 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 = []