summaryrefslogtreecommitdiffstats
path: root/pym/portage/checksum.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-15 06:48:15 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-15 06:48:15 +0000
commit2a841b102f7a852d937d62c57a1cd44f55e6e45b (patch)
treef8aa9656de626b7649e30aa76d8c0cbd28a2bfba /pym/portage/checksum.py
parentd23814e0195ac325f53189a0f2d1049637b5197b (diff)
downloadportage-2a841b102f7a852d937d62c57a1cd44f55e6e45b.tar.gz
portage-2a841b102f7a852d937d62c57a1cd44f55e6e45b.tar.bz2
portage-2a841b102f7a852d937d62c57a1cd44f55e6e45b.zip
Make _generate_hash_function() use _fs_encoding to encode the filename
(if it's not already encoded), and enable errors='strict'. svn path=/main/trunk/; revision=14060
Diffstat (limited to 'pym/portage/checksum.py')
-rw-r--r--pym/portage/checksum.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index b22e62b61..330d85dfb 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -27,7 +27,8 @@ def _generate_hash_function(hashtype, hashobject, origin="unknown"):
@type filename: String
@return: The hash and size of the data
"""
- f = open(_unicode_encode(filename), 'rb')
+ f = open(_unicode_encode(filename,
+ encoding=_fs_encoding, errors='strict'), 'rb')
blocksize = HASHING_BLOCKSIZE
data = f.read(blocksize)
size = 0L