projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d23814e
)
Make _generate_hash_function() use _fs_encoding to encode the filename
author
Zac Medico
<zmedico@gentoo.org>
Sat, 15 Aug 2009 06:48:15 +0000
(06:48 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Sat, 15 Aug 2009 06:48:15 +0000
(06:48 -0000)
(if it's not already encoded), and enable errors='strict'.
svn path=/main/trunk/; revision=14060
pym/portage/checksum.py
patch
|
blob
|
history
diff --git
a/pym/portage/checksum.py
b/pym/portage/checksum.py
index b22e62b6130fe4a0a49e45b8966cf652db818e36..330d85dfb6d26e65b6d0811c4a7cc6e53e62013f 100644
(file)
--- 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