diff options
author | Erik Troan <ewt@redhat.com> | 2000-01-25 19:09:59 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-01-25 19:09:59 +0000 |
commit | fed4a8b5a5ab74e4c0e6710a64093a88ec252649 (patch) | |
tree | c3c95814d9e50103d7f014ecd6f5e7bbf3233793 /textw | |
parent | 6a9410f38252dc50035a5ff1d22ea2c506af4e70 (diff) | |
download | anaconda-fed4a8b5a5ab74e4c0e6710a64093a88ec252649.tar.gz anaconda-fed4a8b5a5ab74e4c0e6710a64093a88ec252649.tar.xz anaconda-fed4a8b5a5ab74e4c0e6710a64093a88ec252649.zip |
if timezone /usr/share file dne, don't display any time at all
Diffstat (limited to 'textw')
-rw-r--r-- | textw/timezone.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/textw/timezone.py b/textw/timezone.py index e776c0121..99f8165b8 100644 --- a/textw/timezone.py +++ b/textw/timezone.py @@ -45,8 +45,11 @@ class TimezoneWindow: self.updateClock() def updateClock(self): - os.environ['TZ'] = self.l.current() - self.label.setText(self.currentTime()) + if os.access("/usr/share/zoneinfo/" + self.l.current(), os.R_OK): + os.environ['TZ'] = self.l.current() + self.label.setText(self.currentTime()) + else: + self.label.setText("") def currentTime(self): return "Current time: " + strftime("%X %Z", localtime(time())) @@ -89,7 +92,7 @@ class TimezoneWindow: while result == "TIMER": result = self.g.run() if result == "TIMER": - self.label.setText(self.currentTime()) + self.updateClock() screen.popWindow() |