summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-03-30 12:58:26 +0200
committerJulian Andres Klode <jak@debian.org>2010-03-30 12:58:26 +0200
commit42e104ddb5dfb532d7bed66affbb2c7977684d16 (patch)
tree2fd3f759940b0af2c113c3e569db591848135447
parente95acfe671c6c40ffdc92f466008dce3fce723a6 (diff)
downloadpython-apt-42e104ddb5dfb532d7bed66affbb2c7977684d16.tar.gz
apt/package.py: Decode using utf-8 in installed_files (LP: #407953).
-rw-r--r--apt/package.py4
-rw-r--r--debian/changelog2
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