Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/controlpanel/model/datetime.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/controlpanel/model/datetime.py')
-rw-r--r--src/controlpanel/model/datetime.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/controlpanel/model/datetime.py b/src/controlpanel/model/datetime.py
index a449fd0..4a4c560 100644
--- a/src/controlpanel/model/datetime.py
+++ b/src/controlpanel/model/datetime.py
@@ -29,6 +29,10 @@ _zone_tab = '/usr/share/zoneinfo/zone.tab'
def _initialize():
'''Initialize the docstring of the set function'''
+ if set_timezone.__doc__ is None:
+ # when running under 'python -OO', all __doc__ fields are None,
+ # so += would fail -- and this function would be unnecessary anyway.
+ return
timezones = read_all_timezones()
for timezone in timezones:
set_timezone.__doc__ += timezone + '\n'