Package: python-debian Version: 0.1.11 Severity: important Tags: patch Hi,
When executing the "dump" method when there is unicode in one of the fields in the rfc822 file a UnicodeDecodeError is raised. An example of this and a traceback can be seen in [0]. This can easily be reproduced by getting a dsc file and throwing some awkward characters in the Maintainer field, then executing: >>> from debian_bundle import deb822 >>> a = deb822.Dsc(file(filename)) >>> a.dump I attach a patch (you can easily apply with git-am(1)) to try and fix this problem. Regards, 0. http://debexpo.workaround.org/trac/ticket/68 -- Jonny Lamb, UK [EMAIL PROTECTED] http://jonnylamb.com GPG: 0x2E039402
From ad57ff6d56074f7c0e35efadd403601b312f5c8f Mon Sep 17 00:00:00 2001 From: Jonny Lamb <[EMAIL PROTECTED]> Date: Fri, 15 Aug 2008 20:14:31 +0100 Subject: [PATCH] Added utf-8 encoding header to deb822. Calling methods on a Deb822 object (such as dump) when there are unicode characters in fields raises a UnicodeDecodeError, because the file's encoding is the system default: ascii. Signed-off-by: Jonny Lamb <[EMAIL PROTECTED]> --- debian_bundle/deb822.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/debian_bundle/deb822.py b/debian_bundle/deb822.py index fbc96eb..1cffd4a 100644 --- a/debian_bundle/deb822.py +++ b/debian_bundle/deb822.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # vim: fileencoding=utf-8 # # A python interface for various rfc822-like formatted files used by Debian -- 1.5.6.3
signature.asc
Description: Digital signature