[f18-branch/master] [PATCH] Encode unicode strings returned by pytz.country_timezones() (#887236)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Tue Dec 18 13:10:55 UTC 2012
On Tue, Dec 18, 2012 at 11:27:00AM +0100, Vratislav Podzimek wrote:
> pytz.country_timezones() now returns unicodes strings instead of
> byte strings. Concatenating byte string and unicode string causes
> traceback, so we need to encode these unicode strings as utf-8
> before returning them from our function.
>
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
> pyanaconda/timezone.py | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/pyanaconda/timezone.py b/pyanaconda/timezone.py
> index f08f0c4..5337a21 100644
> --- a/pyanaconda/timezone.py
> +++ b/pyanaconda/timezone.py
> @@ -134,6 +134,7 @@ def get_all_territory_timezones(territory):
> except KeyError:
> timezones = list()
>
> + timezones = [zone.encode("utf-8") for zone in timezones]
> return timezones
Ack.
Samantha
More information about the anaconda-patches
mailing list