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

Samantha N. Bueno sbueno+anaconda at redhat.com
Tue Sep 16 13:13:39 UTC 2014


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]]
-- 
1.9.3



More information about the anaconda-patches mailing list