From fdc7d1a66c023e6af67046a0cd5d6d9f16caef7e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 5 Aug 2009 18:46:46 +0000 Subject: Fix UnicodeEncodeError in vardbapi._owners_cache._hash_str(), reported by jlec on irc. svn path=/main/trunk/; revision=13924 --- pym/portage/dbapi/vartree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pym') 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) -- cgit v1.2.3-1-g7c22