diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-08-05 18:46:46 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-08-05 18:46:46 +0000 |
commit | fdc7d1a66c023e6af67046a0cd5d6d9f16caef7e (patch) | |
tree | e359f45ad70b4905c2e31257a42f3eb2c9419ab2 | |
parent | ffa65600d253310aaac46bf390cad02f506a4cd4 (diff) | |
download | portage-fdc7d1a66c023e6af67046a0cd5d6d9f16caef7e.tar.gz portage-fdc7d1a66c023e6af67046a0cd5d6d9f16caef7e.tar.bz2 portage-fdc7d1a66c023e6af67046a0cd5d6d9f16caef7e.zip |
Fix UnicodeEncodeError in vardbapi._owners_cache._hash_str(), reported by
jlec on irc.
svn path=/main/trunk/; revision=13924
-rw-r--r-- | pym/portage/dbapi/vartree.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 075f38b2b..b9dba438b 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1425,7 +1425,7 @@ class vardbapi(dbapi): h = self._new_hash() # Always use a constant utf_8 encoding here, since # the "default" encoding can change. - h.update(s) + h.update(s.encode('utf_8', 'replace')) h = h.hexdigest() h = h[-self._hex_chars:] h = int(h, 16) |