diff options
Diffstat (limited to 'pym/portage/package/ebuild/doebuild.py')
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index e47915907..a324af2de 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -290,10 +290,11 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None, eapi = None if mydo == 'depend' and 'EAPI' not in mysettings.configdict['pkg']: if eapi is None and 'parse-eapi-ebuild-head' in mysettings.features: - eapi = _parse_eapi_ebuild_head( - io.open(_unicode_encode(ebuild_path, + with io.open(_unicode_encode(ebuild_path, encoding=_encodings['fs'], errors='strict'), - mode='r', encoding=_encodings['content'], errors='replace')) + mode='r', encoding=_encodings['content'], + errors='replace') as f: + eapi = _parse_eapi_ebuild_head(f) if eapi is not None: if not eapi_is_supported(eapi): |