summaryrefslogtreecommitdiffstats
path: root/pym/portage/manifest.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/manifest.py')
-rw-r--r--pym/portage/manifest.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py
index 4714da032..13efab791 100644
--- a/pym/portage/manifest.py
+++ b/pym/portage/manifest.py
@@ -1,8 +1,8 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import codecs
import errno
+import io
import portage
portage.proxy.lazyimport.lazyimport(globals(),
@@ -141,7 +141,7 @@ class Manifest(object):
"""Parse a manifest. If myhashdict is given then data will be added too it.
Otherwise, a new dict will be created and returned."""
try:
- fd = codecs.open(_unicode_encode(file_path,
+ fd = io.open(_unicode_encode(file_path,
encoding=_encodings['fs'], errors='strict'), mode='r',
encoding=_encodings['repo.content'], errors='replace')
if myhashdict is None:
@@ -229,7 +229,7 @@ class Manifest(object):
update_manifest = True
if not force:
try:
- f = codecs.open(_unicode_encode(self.getFullname(),
+ f = io.open(_unicode_encode(self.getFullname(),
encoding=_encodings['fs'], errors='strict'),
mode='r', encoding=_encodings['repo.content'],
errors='replace')
@@ -519,7 +519,7 @@ class Manifest(object):
mfname = self.getFullname()
if not os.path.exists(mfname):
return rVal
- myfile = codecs.open(_unicode_encode(mfname,
+ myfile = io.open(_unicode_encode(mfname,
encoding=_encodings['fs'], errors='strict'),
mode='r', encoding=_encodings['repo.content'], errors='replace')
lines = myfile.readlines()