handle list of list for python-apt < 0.7.9 compatibility
This commit is contained in:
parent
f9574cc318
commit
6fce4a9c3d
1 changed files with 2 additions and 1 deletions
|
@ -180,7 +180,8 @@ def package_versions(pkgname, pkg, pkg_cache):
|
|||
# assume older version of python-apt is installed
|
||||
# apt.package.Package#versions require python-apt >= 0.7.9.
|
||||
pkg_cache_list = (p for p in pkg_cache.Packages if p.Name == pkgname)
|
||||
pkg_versions = (p.VersionList for p in pkg_cache_list)
|
||||
pkg_list_of_lists = (p.VersionList for p in pkg_cache_list)
|
||||
pkg_versions = (p for l in pkg_list_of_lists for p in l)
|
||||
versions = set(p.VerStr for p in pkg_versions)
|
||||
|
||||
return versions
|
||||
|
|
Loading…
Reference in a new issue