ubuntutools.distro_info: Fix TypeError crash (LP: #731398).

This commit is contained in:
Benjamin Drung 2011-03-08 16:55:55 +01:00
parent b67cf6e986
commit 82187df277
2 changed files with 4 additions and 1 deletions

3
debian/changelog vendored
View File

@ -17,8 +17,9 @@ ubuntu-dev-tools (0.120) UNRELEASED; urgency=low
[ Benjamin Drung ]
* data/ubuntu.csv: Add Oneiric Ocelot to the list of know releases.
* ubuntutools.distro_info: Fix TypeError crash (LP: #731398).
-- Benjamin Drung <bdrung@debian.org> Mon, 07 Mar 2011 11:18:01 +0100
-- Benjamin Drung <bdrung@debian.org> Tue, 08 Mar 2011 16:54:59 +0100
ubuntu-dev-tools (0.119) unstable; urgency=low

View File

@ -108,6 +108,8 @@ class DistroInfo(object):
def unsupported(self, date=None):
"""Get list of all unsupported distributions based on the given date."""
if date is None:
date = self._date
supported = self.supported(date)
distros = [x["series"] for x in self._avail(date)
if x["series"] not in supported]