projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dd5593
)
read_corresponding_eapi_file: unicode, bug 398587
author
Zac Medico
<zmedico@gentoo.org>
Thu, 12 Jan 2012 01:34:49 +0000
(17:34 -0800)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 12 Jan 2012 01:34:49 +0000
(17:34 -0800)
pym/portage/util/__init__.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/__init__.py
b/pym/portage/util/__init__.py
index 58501dca6c2e3bb09c70ba8aacc7532190ed91b2..13aa721aca88d50311800d4d899af17086be86fa 100644
(file)
--- a/
pym/portage/util/__init__.py
+++ b/
pym/portage/util/__init__.py
@@
-388,7
+388,9
@@
def read_corresponding_eapi_file(filename):
default = "0"
eapi_file = os.path.join(os.path.dirname(filename), "eapi")
try:
- f = open(eapi_file, "r")
+ f = io.open(_unicode_encode(eapi_file,
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'], errors='replace')
lines = f.readlines()
if len(lines) == 1:
eapi = lines[0].rstrip("\n")