Bug 76707

Summary: Date configuration application lacks to read/write timezone information correctly
Product: [Retired] Red Hat Linux Reporter: Need Real Name <demonsly>
Component: redhat-config-dateAssignee: Brent Fox <bfox>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-25 06:15:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-10-25 06:15:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
The application 'redhat-config-date' doesn't write or read the imezone from the
/etc/sysconfig/date nor /etc/localtime file. It results in a program's fatal
exception, (in innermost last) saying that the currentEntry of type NoneType
doesn't have a property 'tz': 

Traceback (most recent call last):
  File "./redhat-config-date.py", line 35, in ?
    mainWindow.mainWindow().stand_alone()
  File "./mainWindow.py", line 181, in __init__
    self.timezonePage = timezone_gui.timezonePage()
  File "./timezone_gui.py", line 50, in __init__
    self.tz = TimezoneMap(zonetab, self.default, map=path)
  File "./timezone_map_gui.py", line 139, in __init__
    self.setCurrent(self.currentEntry)
  File "./timezone_map_gui.py", line 180, in setCurrent
    self.markers[self.currentEntry.tz].hide()
AttributeError: 'NoneType' object has no attribute 'tz'

Adding  entry = self.currentEntry under the 'if not entry' statement in the
TimezoneMap.setCurrent() function (under the line #176 of the
timezone_map_gui.py file) makes the application run without an exception, but
does not solve the main problem. In general, this bug makes the
redhat-config-date application unusable. This is why the priority is set to 'high'.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Run it first time, set the time zone to something like "Europe/London"
2. Second time it won't run, crashing with a fatal exception.
	

Actual Results:  Traceback (most recent call last):
  File "./redhat-config-date.py", line 35, in ?
    mainWindow.mainWindow().stand_alone()
  File "./mainWindow.py", line 181, in __init__
    self.timezonePage = timezone_gui.timezonePage()
  File "./timezone_gui.py", line 50, in __init__
    self.tz = TimezoneMap(zonetab, self.default, map=path)
  File "./timezone_map_gui.py", line 139, in __init__
    self.setCurrent(self.currentEntry)
  File "./timezone_map_gui.py", line 180, in setCurrent
    self.markers[self.currentEntry.tz].hide()
AttributeError: 'NoneType' object has no attribute 'tz'


Expected Results:  I expected it to show a dialog. When this program is fixed
with a noted  'entry = self.currentEntry' line under the 'if not entry:'
statement in the TimezoneMap.setCurrent() function (under the line #176 of the
timezone_map_gui.py file), the program runs succesfully, but lacks to correctly
determine the curent timezone (even if it was set before using it). It always
falls back to the New York timezone.

Additional info:

Traceback (most recent call last):
  File "./redhat-config-date.py", line 35, in ?
    mainWindow.mainWindow().stand_alone()
  File "./mainWindow.py", line 181, in __init__
    self.timezonePage = timezone_gui.timezonePage()
  File "./timezone_gui.py", line 50, in __init__
    self.tz = TimezoneMap(zonetab, self.default, map=path)
  File "./timezone_map_gui.py", line 139, in __init__
    self.setCurrent(self.currentEntry)
  File "./timezone_map_gui.py", line 180, in setCurrent
    self.markers[self.currentEntry.tz].hide()
AttributeError: 'NoneType' object has no attribute 'tz'

Comment 1 Brent Fox 2002-10-25 13:34:35 UTC

*** This bug has been marked as a duplicate of 76313 ***