diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-05 22:01:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-05 22:01:43 +0000 |
commit | 120187eb53f69b015cbbcecd38da0901e3e1cd36 (patch) | |
tree | 37c7b3874a4b1b4eb7fe8ba70a263eca5cbd06da /pym/_emerge | |
parent | 368862a96eb14b285352b9ab936a1b7adabfd740 (diff) | |
download | portage-120187eb53f69b015cbbcecd38da0901e3e1cd36.tar.gz portage-120187eb53f69b015cbbcecd38da0901e3e1cd36.tar.bz2 portage-120187eb53f69b015cbbcecd38da0901e3e1cd36.zip |
Use _unicode_decode() on the string returned from time.strftime(), in order
to avoid a potential UnicodeDecodeError later. Thanks to Markus Duft
<mduft@gentoo.org> for reporting.
svn path=/main/trunk/; revision=14201
Diffstat (limited to 'pym/_emerge')
-rw-r--r-- | pym/_emerge/main.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index db57f2985..57277ecfb 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -9,6 +9,8 @@ import textwrap import platform import portage from portage import os +from portage import _encodings +from portage import _unicode_decode import _emerge.help import portage.xpak, commands, errno, re, time from portage.output import colorize, xtermTitle, xtermTitleReset @@ -1297,7 +1299,9 @@ def emerge_main(): if not "--pretend" in myopts: emergelog(xterm_titles, "Started emerge on: "+\ - time.strftime("%b %d, %Y %H:%M:%S", time.localtime())) + _unicode_decode( + time.strftime("%b %d, %Y %H:%M:%S", time.localtime()), + encoding=_encodings['content'], errors='replace')) myelogstr="" if myopts: myelogstr=" ".join(myopts) |