From 120187eb53f69b015cbbcecd38da0901e3e1cd36 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 5 Sep 2009 22:01:43 +0000 Subject: Use _unicode_decode() on the string returned from time.strftime(), in order to avoid a potential UnicodeDecodeError later. Thanks to Markus Duft for reporting. svn path=/main/trunk/; revision=14201 --- pym/portage/glsa.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pym/portage/glsa.py') 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): -- cgit v1.2.3-1-g7c22