[f18-branch/master] [PATCH] Encode unicode strings returned by pytz.country_timezones() (#887236)
Brian C. Lane
bcl at redhat.com
Wed Dec 19 00:45:23 UTC 2012
On Tue, Dec 18, 2012 at 08:10:55AM -0500, Samantha N. Bueno wrote:
> 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.
git am'd for tonight's build of 18.37.4-1
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20121218/97c36a25/attachment.sig>
More information about the anaconda-patches
mailing list