Package: python-debian
Version: 0.1.10
Severity: Normal
Tags: patch

Hi,

The Changes class has incorrect multivalued fields for Checksums-Sha1
and Checksums-Sha256. They expect the same as Files, but they actually
omit the section and priority.

Calling Changes.dump() fails with a "KeyError: priority" on a changes
file with Checksums-Sha* fields. If the changes file is manually altered
to include these fields, dump() works, but lintian fails badly.

I attach a patch to fix this.

Thanks,

-- 
Jonny Lamb, UK                                   [EMAIL PROTECTED]
http://jonnylamb.com                                     GPG: 0x2E039402
diff -Nruad -Nruad python-debian-0.1.10.orig/debian_bundle/deb822.py 
python-debian-0.1.10/debian_bundle/deb822.py
--- python-debian-0.1.10.orig/debian_bundle/deb822.py   2008-06-25 
02:06:51.000000000 +0100
+++ python-debian-0.1.10/debian_bundle/deb822.py        2008-06-25 
02:07:29.000000000 +0100
@@ -480,8 +480,8 @@
 class Changes(_multivalued):
     _multivalued_fields = {
         "files": [ "md5sum", "size", "section", "priority", "name" ],
-        "checksums-sha1": ["sha1", "size", "section", "priority", "name"],
-        "checksums-sha256": ["sha256", "size", "section", "priority", "name"],
+        "checksums-sha1": ["sha1", "size", "name"],
+        "checksums-sha256": ["sha256", "size", "name"],
     }
 
     def get_pool_path(self):

Attachment: signature.asc
Description: Digital signature

Reply via email to