Completer: don't crash if there are candidates in t-p-u

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
Adam D. Barratt 2013-03-14 19:58:14 +00:00
parent 8c15568b8f
commit 8e72456651

View File

@ -40,6 +40,8 @@ class Completer(object):
if pkg[0] == '-':
suite = 'testing'
pkg = pkg[1:]
if "_" in pkg:
(pkg, suite) = pkg.split("_")
if "/" in pkg:
pkg = pkg.split("/")[0]
name = "%s/%s" % (e.name, britney.sources[suite][pkg][0]) # 0 == VERSION