From b94455e7afd0e08ce1a8aab890dbee0d42566d7b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 6 Jul 2010 09:45:16 +0200 Subject: fix debfile to work with py3, update tests --- apt/debfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt') diff --git a/apt/debfile.py b/apt/debfile.py index 81cd1dd2..16d1b15e 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -62,7 +62,8 @@ class DebPackage(object): self.filename = filename self._debfile = apt_inst.DebFile(open(self.filename)) control = self._debfile.control.extractdata("control") - self._sections = apt_pkg.TagSection(control) + # hm, 'replace' is probably better but python2.6 test fail with that + self._sections = apt_pkg.TagSection(control.decode("UTF-8", 'ignore')) self.pkgname = self._sections["Package"] def __getitem__(self, key): -- cgit v1.2.3