aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-05 22:01:43 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-05 22:01:43 +0000
commit120187eb53f69b015cbbcecd38da0901e3e1cd36 (patch)
tree37c7b3874a4b1b4eb7fe8ba70a263eca5cbd06da /pym/portage/glsa.py
parentDEPCACHE_PATH is not used with ROOT at all, so move it out of the target_root... (diff)
downloadportage-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/portage/glsa.py')
-rw-r--r--pym/portage/glsa.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py
index 6dc73ac67..95c3c813c 100644
--- a/pym/portage/glsa.py
+++ b/pym/portage/glsa.py
@@ -404,7 +404,8 @@ def format_date(datestr):
return datestr
# TODO We could format to local date format '%x' here?
- return d.strftime("%B %d, %Y")
+ return _unicode_decode(d.strftime("%B %d, %Y"),
+ encoding=_encodings['content'], errors='replace')
# simple Exception classes to catch specific errors
class GlsaTypeException(Exception):