1 |
commit: 31b4d0cb3a183e29fe0d745187470ded37ffd433 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 12 01:34:49 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 12 01:34:49 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=31b4d0cb |
7 |
|
8 |
read_corresponding_eapi_file: unicode, bug 398587 |
9 |
|
10 |
--- |
11 |
pym/portage/util/__init__.py | 4 +++- |
12 |
1 files changed, 3 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py |
15 |
index 58501dc..13aa721 100644 |
16 |
--- a/pym/portage/util/__init__.py |
17 |
+++ b/pym/portage/util/__init__.py |
18 |
@@ -388,7 +388,9 @@ def read_corresponding_eapi_file(filename): |
19 |
default = "0" |
20 |
eapi_file = os.path.join(os.path.dirname(filename), "eapi") |
21 |
try: |
22 |
- f = open(eapi_file, "r") |
23 |
+ f = io.open(_unicode_encode(eapi_file, |
24 |
+ encoding=_encodings['fs'], errors='strict'), |
25 |
+ mode='r', encoding=_encodings['repo.content'], errors='replace') |
26 |
lines = f.readlines() |
27 |
if len(lines) == 1: |
28 |
eapi = lines[0].rstrip("\n") |