def getDefaultTimeZone(self, instPath): try: return self.localeInfo[self.systemLang][4] except KeyError: # If doing an upgrade and the system language is something not # recognized by anaconda, we should try to see if we can figure # it out from the running system. if os.path.exists(instPath + "/etc/sysconfig/clock"): cfg = SimpleConfigFile() cfg.read(instPath + "/etc/sysconfig/clock") try: return cfg.get("ZONE") except: return self.localeInfo[self._default][4] else: return self.localeInfo[self._default][4]