diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-05-07 19:01:58 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-05-07 19:01:58 +0000 |
commit | c91e39e76c048d5dd0955a27e9a8c8ce2d557d9b (patch) | |
tree | 9537d0edf1dc9f447fd542ea5cbad2e4d3c830bc | |
parent | 085daa6d1715e8b09a8a7da5f813bfc5cd8ae692 (diff) | |
download | portage-c91e39e76c048d5dd0955a27e9a8c8ce2d557d9b.tar.gz portage-c91e39e76c048d5dd0955a27e9a8c8ce2d557d9b.tar.bz2 portage-c91e39e76c048d5dd0955a27e9a8c8ce2d557d9b.zip |
Properly encode metadata strings as utf-8 in order to avoid "UnicodeEncodeError: 'ascii' codec can't encode character" exception when
given a unicode string.
svn path=/main/trunk/; revision=3328
-rw-r--r-- | pym/cache/flat_hash.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/cache/flat_hash.py b/pym/cache/flat_hash.py index dfa7ad0c7..b255b56e2 100644 --- a/pym/cache/flat_hash.py +++ b/pym/cache/flat_hash.py @@ -82,7 +82,7 @@ class database(fs_template.FsBased): for k, v in values.items(): if k != "_mtime_" and (k == "_eclasses_" or k in self._known_keys): - myf.write("%s=%s\n" % (k, v)) + myf.write(("%s=%s\n" % (k, v)).encode("utf-8")) myf.close() self._ensure_access(fp, mtime=values["_mtime_"]) |