Horizon dashboard crashes on non-exisiting TimeZones
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On opening the 'Settings' form the top right menu, the user gets the settings page on which he can change password ar select a different timezone. The timezones that are presented are created from all existing timezones. However the locales may not be available for alle these timezones. For example when 'US/Samoa' is not present, the UI will crash.
Proposed change is to only present timezones to the user for which a locale settings is available
Example of Error:
FileNotFoundError at /settings/
[Errno 2] No such file or directory: '/usr/lib/
Request Method: GET
Request URL: https:/
Django Version: 4.2.15
Exception Type: FileNotFoundError
Exception Value:
[Errno 2] No such file or directory: '/usr/lib/
This is proposed change:
NOTE: Sorry for formatting of below code, I can't get get spaces being respected by launchpad, Grrr
<pre>
a/openstack_
index 1c1f58dfa.
--- a/openstack_
+++ b/openstack_
@@ -82,8 +82,12 @@ class UserSettingsFor
elif tz == "GMT":
else:
- tz_label = babel.dates.
- tz, locale=
+ try:
+ tz_label = babel.dates.
+ tz, locale=
+ except:
+ continue
+
# Translators: UTC offset and timezone label
</pre>
This is intended code fragment:
for tz, offset in self._sorted_
try:
except Exception:
if tz == "UTC":
elif tz == "GMT":
else:
# Translators: UTC offset and timezone label
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Fix proposed to branch: master /review. opendev. org/c/openstack /horizon/ +/939546
Review: https:/