aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-21 04:46:31 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-21 04:46:31 +0000
commit82f0c8c317c1d51a45589b708e476e7711a21da4 (patch)
treeace52bce4969f515901ca4fbde735071e3c28221 /pym/portage/manifest.py
parentFix typo. (diff)
downloadportage-82f0c8c317c1d51a45589b708e476e7711a21da4.tar.gz
portage-82f0c8c317c1d51a45589b708e476e7711a21da4.tar.bz2
portage-82f0c8c317c1d51a45589b708e476e7711a21da4.zip
Replace _content_encoding, _fs_encoding, and _merge_encoding with direct
usage of _encodings. svn path=/main/trunk/; revision=14113
Diffstat (limited to 'pym/portage/manifest.py')
-rw-r--r--pym/portage/manifest.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py
index 4c4cb60b3..25893d759 100644
--- a/pym/portage/manifest.py
+++ b/pym/portage/manifest.py
@@ -12,8 +12,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
)
from portage import os
-from portage import _content_encoding
-from portage import _fs_encoding
+from portage import _encodings
from portage import _unicode_decode
from portage import _unicode_encode
from portage.exception import DigestException, FileNotFound, \
@@ -145,8 +144,8 @@ class Manifest(object):
Otherwise, a new dict will be created and returned."""
try:
fd = codecs.open(_unicode_encode(file_path,
- encoding=_fs_encoding, errors='strict'), mode='r',
- encoding=_content_encoding, errors='replace')
+ encoding=_encodings['fs'], errors='strict'), mode='r',
+ encoding=_encodings['repo.content'], errors='replace')
if myhashdict is None:
myhashdict = {}
self._parseDigests(fd, myhashdict=myhashdict, **kwargs)
@@ -233,8 +232,9 @@ class Manifest(object):
if not force:
try:
f = codecs.open(_unicode_encode(self.getFullname(),
- encoding=_fs_encoding, errors='strict'),
- mode='r', encoding=_content_encoding, errors='replace')
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'],
+ errors='replace')
oldentries = list(self._parseManifestLines(f))
f.close()
if len(oldentries) == len(myentries):
@@ -327,7 +327,7 @@ class Manifest(object):
for f in pkgdir_files:
try:
f = _unicode_decode(f,
- encoding=_fs_encoding, errors='strict')
+ encoding=_encodings['fs'], errors='strict')
except UnicodeDecodeError:
continue
if f[:1] == ".":
@@ -362,7 +362,7 @@ class Manifest(object):
for f in files:
try:
f = _unicode_decode(f,
- encoding=_fs_encoding, errors='strict')
+ encoding=_encodings['fs'], errors='strict')
except UnicodeDecodeError:
continue
full_path = os.path.join(parentdir, f)
@@ -523,8 +523,8 @@ class Manifest(object):
if not os.path.exists(mfname):
return rVal
myfile = codecs.open(_unicode_encode(mfname,
- encoding=_fs_encoding, errors='strict'),
- mode='r', encoding=_content_encoding, errors='replace')
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'], errors='replace')
lines = myfile.readlines()
myfile.close()
for l in lines: