summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py2
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)