From 42e104ddb5dfb532d7bed66affbb2c7977684d16 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 30 Mar 2010 12:58:26 +0200 Subject: apt/package.py: Decode using utf-8 in installed_files (LP: #407953). --- apt/package.py | 4 ++-- debian/changelog | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apt/package.py b/apt/package.py index 0c026504..32480c39 100644 --- a/apt/package.py +++ b/apt/package.py @@ -955,9 +955,9 @@ class Package(object): """ path = "/var/lib/dpkg/info/%s.list" % self.name try: - file_list = open(path) + file_list = open(path, "rb") try: - return file_list.read().decode().split("\n") + return file_list.read().decode("utf-8").split(u"\n") finally: file_list.close() except EnvironmentError: diff --git a/debian/changelog b/debian/changelog index c0ff72c7..0e494a81 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ python-apt (0.7.94.3) UNRELEASED; urgency=low [ Julian Andres Klode ] + * apt/package.py: + - Decode using utf-8 in installed_files (LP: #407953). * python/generic.cc: - Fix a memory leak when using old attribute names. - Map ArchiveURI property to archive_uri -- cgit v1.2.3