On Thu, 2013-09-05 at 15:10 +0200, Martin Kolman wrote:
During kickstarted installation, no default timezone is set and if the kickstart does not specify a timezone, the date time spoke needs to work correctly without an initial timezone value.
Signed-off-by: Martin Kolman mkolman@redhat.com
pyanaconda/ui/gui/spokes/datetime_spoke.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py index 5e0c9ce..cfd4887 100644 --- a/pyanaconda/ui/gui/spokes/datetime_spoke.py +++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py @@ -405,12 +405,16 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke): return _("Nothing selected")
def apply(self):
old_tz = self.data.timezone.timezone# we could use self._tzmap.get_timezone() here, but it returns "" if # Etc/XXXXXX timezone is selected region = self._get_active_region() city = self._get_active_city()
# nothing selected, just leave the spoke and# return to hub without changing anythingif not region or not city:returnold_tz = self.data.timezone.timezone new_tz = region + "/" + city self.data.timezone.timezone = new_tz@@ -702,8 +706,9 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
def _restore_old_city_region(self): """Restore stored "old" (or last valid) values."""
self._set_timezone(self._old_region + "/" + self._old_city)
# check if there are old value to go back toif self._old_region and self._old_city:self._set_timezone(self._old_region + "/" + self._old_city)def on_up_hours_clicked(self, *args): self._stop_and_maybe_start_time_updating()
Looks good to me.