Bug#504413: KeyError: problem

Pietro Abate pietro.abate at pps.jussieu.fr
Mon Nov 3 17:10:50 UTC 2008


Package: python-debian
Version: 0.1.11
Severity: normal


This snippet of code highligths this problem that is probably related to
the fact that keys are saved at the class level and not at the instance
level (something to do with shared_storage maybe ??).

:)
p


------------------------- test.py --------------

mport debian_bundle.deb822


paragraphs = debian_bundle.deb822.Packages.iter_paragraphs(open('/var/lib/apt/lists/ftp.fr.debian.org_debian_dists_unstable_contrib_binary-amd64_Packages','r'))

pkglist = {}

pkg = paragraphs.next()
k = (pkg['package'],pkg['version'])
pkglist[k] = pkg
print pkg

pkg = paragraphs.next()
k = (pkg['package'],pkg['version'])
pkglist[k] = pkg
print pkg

pkg = paragraphs.next()
k = (pkg['package'],pkg['version'])
pkglist[k] = pkg
print pkg

print pkglist

sys.exit(0)

----------------------------

abate at dev.au:~/Projects/$python test.py
Package: acx100-source
Priority: extra
Section: contrib/net
Installed-Size: 292
Maintainer: Stefano Canepa <sc at linux.it>
Architecture: all
Source: acx100
Version: 20070101-3
Depends: debhelper (>= 4.0), dpatch, module-assistant
Filename: pool/contrib/a/acx100/acx100-source_20070101-3_all.deb
Size: 224900
MD5sum: f9673656b0c676c22bd64c351dd7536d
SHA1: 3cac7ad52e0215d1603605fc43d8ce3c81594990
SHA256: 6ad06bb46bdf8a7d941d5d3f7e02e976dbfe6ce3f26fb5067590bd044d44cb08
Description: ACX100/ACX111 wireless network drivers source
 This package provides the source code of the Linux drivers for wireless
 network cards using TI ACX100/ACX111 chips. This includes DWL-[G]520+
 PCI, DWL-[G]650+ CardBus, GL-2422MP mini-PCI, DWL-120+ USB, USR5410, etc.
 See http://acx100.sourceforge.net/ for information about your wireless
 device.
 .
 In order to compile the kernel modules you need the kernel sources (or
 the kernel-headers for the kernel-image packages from Debian). For
 compile instructions look into usr/share/doc/acx100-source/README.Debian
 or simply use the module-assistant utility.
 .
 Please also note that the ACX100/111 chips need a firmware to be
 operational. You can get this firmware from the Microsoft Windows or
 from homepage.
Homepage: http://lisas.de/~andi/acx100/
Tag: admin::kernel, implemented-in::c, role::source, use::driver

Package: alien-arena
Priority: extra
Section: contrib/games
Installed-Size: 1420
Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Architecture: amd64
Version: 7.0-1
Depends: libc6 (>= 2.7-1), libcurl3-gnutls (>= 7.16.2-1), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, libjpeg62, libsdl1.2debian (>= 1.2.10-1), libx11-6, libxext6, libxxf86dga1, libxxf86vm1, alien-arena-data (>= 7.0), alien-arena-data (<< 7.1)
Suggests: alien-arena-browser
Filename: pool/contrib/a/alien-arena/alien-arena_7.0-1_amd64.deb
Size: 642848
MD5sum: fed7c664a13bad08f7c3368443543376
SHA1: 101a3ad9bf6da67b4c5baafb2883d57181df9bc5
SHA256: 3f3dccf309cdd66d629b6bd84a8870e059fed12ce333cb76088259af31ca4073
Description: Standalone 3D first person online deathmatch shooter
 ALIEN ARENA is a standalone 3D first person online deathmatch shooter
 crafted from the original source code of Quake II and Quake III, released
 by id Software under the GPL license. With features including 32 bit
 graphics, new particle engine and effects, light blooms, reflective water,
 hi resolution textures and skins, hi poly models, stain maps, ALIEN ARENA
 pushes the envelope of graphical beauty rivaling today's top games.
 .
 This package installs the SDL client for Alien Arena.
Homepage: http://red.planetarena.org
Tag: game::fps, implemented-in::c, interface::3d, interface::x11, network::client, role::program, use::gameplaying, x11::application

Package: alien-arena-browser
Priority: extra
Section: contrib/games
Installed-Size: 160
Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Architecture: all
Source: alien-arena
Version: 7.0-1
Depends: alien-arena (>= 7.0-1), ruby-gnome2, ruby
Filename: pool/contrib/a/alien-arena/alien-arena-browser_7.0-1_all.deb
Size: 37128
MD5sum: 343aab4c68a02f5fac368392500bbfe2
SHA1: a1e20abdb74a80ce2dd56953481e1d82e61fb8a4
SHA256: dc7df3afa6c25f32753be48042186d15f9048a9a218930c890f4b0141ffa0613
Description: stand alone server browser for Alien Arena
 ALIEN ARENA is a standalone 3D first person online deathmatch shooter
 crafted from the original source code of Quake II and Quake III, released
 by id Software under the GPL license. With features including 32 bit
 graphics, new particle engine and effects, light blooms, reflective water,
 hi resolution textures and skins, hi poly models, stain maps, ALIEN ARENA
 pushes the envelope of graphical beauty rivaling today's top games.
 .
 This package installs the stand alone server browser for Alien Arena which
 allows for browsing available matches without having to launch the game.
Homepage: http://red.planetarena.org
Tag: implemented-in::ruby, role::program, use::gameplaying

{('alien-arena', '7.0-1'): Traceback (most recent call last):
  File "test.py", line 24, in <module>
    print pkglist
  File "/var/lib/python-support/python2.5/debian_bundle/deb822.py", line 116, in __repr__
    return '{%s}' % ', '.join(['%r: %r' % (k, v) for k, v in self.items()])
  File "/usr/lib/python2.5/UserDict.py", line 117, in items
    return list(self.iteritems())
  File "/usr/lib/python2.5/UserDict.py", line 106, in iteritems
    yield (k, self[k])
  File "/var/lib/python-support/python2.5/debian_bundle/deb822.py", line 101, in __getitem__
    return self.__parsed[key]
KeyError: 'Suggests'


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-6-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-debian depends on:
ii  python                        2.5.2-3    An interactive high-level object-o
ii  python-support                0.8.7      automated rebuilding support for P

Versions of packages python-debian recommends:
ii  python-apt                  0.7.7.1+nmu1 Python interface to libapt-pkg

python-debian suggests no packages.

-- no debconf information





More information about the pkg-python-debian-maint mailing list