Package: python-debian
Version: 0.1.8
Severity: minor
Tags: patch
Not all entries in /var/lib/dpkg/status have a Maintainer field. The
attached patch makes the example work as intended (AFAICT).
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-1-686 (SMP w/1 CPU core)
Locale: LANG=pt_BR.utf8, LC_CTYPE=pt_BR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-debian depends on:
ii python 2.4.4-6 An interactive high-level object-o
ii python-support 0.7.5 automated rebuilding support for p
python-debian recommends no packages.
-- no debconf information
--
Antonio Terceiro <[EMAIL PROTECTED]>
http://people.softwarelivre.org/~terceiro/
GnuPG ID: 0F9CB28F
=== modified file 'examples/packages/grep-maintainer'
--- examples/packages/grep-maintainer 2007-07-14 22:25:00 +0000
+++ examples/packages/grep-maintainer 2007-12-26 14:34:21 +0000
@@ -23,6 +23,6 @@
packages = PackageFile('/var/lib/dpkg/status')
for pkg in packages:
- if maint_RE.search(pkg['maintainer']):
+ if pkg.has_key('maintainer') and maint_RE.search(pkg['maintainer']):
print pkg['package']