projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbeb810
)
parse_desktop_entry: fix python3 bug #429544
author
Zac Medico
<zmedico@gentoo.org>
Thu, 2 Aug 2012 19:55:09 +0000
(12:55 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 2 Aug 2012 19:55:09 +0000
(12:55 -0700)
pym/portage/util/_desktop_entry.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/_desktop_entry.py
b/pym/portage/util/_desktop_entry.py
index 790178013769833409645a314ad782ad47376c64..8c760c0435de9791b06c1420de8a915c82a4f4ce 100644
(file)
--- a/
pym/portage/util/_desktop_entry.py
+++ b/
pym/portage/util/_desktop_entry.py
@@
-31,7
+31,11
@@
def parse_desktop_entry(path):
encoding=_encodings['fs'], errors='strict'),
mode='r', encoding=_encodings['repo.content'],
errors='replace') as f:
- read_file(f)
+ content = f.read()
+
+ # In Python 3.2, read_file does not support bytes in file names
+ # (see bug #429544), so use StringIO to hide the file name.
+ read_file(io.StringIO(content))
return parser