[master/rhel7-branch] Re-order the tz's in text mode to mirror the graphical order. (#1032560)

Vratislav Podzimek vpodzime at redhat.com
Tue Sep 16 18:06:21 UTC 2014


On Tue, 2014-09-16 at 09:13 -0400, Samantha N. Bueno wrote:
> I don't know why these were ever not in the same order. Anyway now
> they are.
> 
> Resolves: rhbz#1032560
> ---
>  pyanaconda/ui/tui/spokes/time.py | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/pyanaconda/ui/tui/spokes/time.py b/pyanaconda/ui/tui/spokes/time.py
> index 403d962..da4cec0 100644
> --- a/pyanaconda/ui/tui/spokes/time.py
> +++ b/pyanaconda/ui/tui/spokes/time.py
> @@ -33,8 +33,12 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
>          NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
>  
>      def initialize(self):
> -        self._timezones = dict((k, sorted(v)) for k,v in timezone.get_all_regions_and_timezones().iteritems())
> -        self._regions = [r for r in self._timezones]
> +        # it's stupid to call get_all_regions_and_timezones twice, but regions
> +        # needs to be unsorted in order to display in the same order as the GUI
> +        # so whatever
> +        self._regions = timezone.get_all_regions_and_timezones().keys()
> +        self._timezones = dict((k, sorted(v)) for k,v in timezone.get_all_regions_and_timezones
> +().iteritems())
>          self._lower_regions = [r.lower() for r in self._timezones]
>  
>          self._zones = ["%s/%s" % (region, z) for region in self._timezones for z in self._timezones[region]]
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list