Bug#554895: python-apt: Dictonary access of VerionList is broken
Package: python-apt
Version: 0.7.13.3
Severity: normal
Tags: patch
This bug is caused by two small typos, see patch for details.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-apt depends on:
ii apt [libapt-pkg-libc6.9-6-4.8 0.7.24 Advanced front-end for dpkg
ii apt-utils [libapt-inst-libc6. 0.7.24 APT utility programs
ii libc6 2.10.1-5 GNU C Library: Shared libraries
ii libgcc1 1:4.4.2-2 GCC support library
ii libstdc++6 4.4.2-2 The GNU Standard C++ Library v3
ii lsb-release 3.2-23 Linux Standard Base version report
ii python 2.5.4-2 An interactive high-level object-o
ii python-central 0.6.12 register and build utility for Pyt
Versions of packages python-apt recommends:
ii iso-codes 3.11.1-1 ISO language, territory, currency,
ii libjs-jquery 1.3.3-2 JavaScript library for dynamic web
Versions of packages python-apt suggests:
pn python-apt-dbg <none> (no description available)
ii python-gtk2 2.16.0-1 Python bindings for the GTK+ widge
ii python-vte 1:0.22.3-1 Python bindings for the VTE widget
-- no debconf information
=== modified file 'apt/package.py'
--- apt/package.py 2009-08-28 12:39:22 +0000
+++ apt/package.py 2009-11-06 09:04:32 +0000
@@ -551,7 +551,7 @@
except TypeError:
# Dictionary interface item is a string.
for ver in self._versions:
- if ver.ver_str == item:
+ if ver.VerStr == item:
return Version(self._package, ver)
raise KeyError("Version: %r not found." % (item))
@@ -567,7 +567,7 @@
item = item.version
# Dictionary interface.
for ver in self._versions:
- if ver.ver_str == item:
+ if ver.VerStr == item:
return True
return False
Reply to: