Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/controlpanel/model/language.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/controlpanel/model/language.py')
-rw-r--r--src/controlpanel/model/language.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/controlpanel/model/language.py b/src/controlpanel/model/language.py
index d835f77..404d9dd 100644
--- a/src/controlpanel/model/language.py
+++ b/src/controlpanel/model/language.py
@@ -53,6 +53,10 @@ def read_all_languages():
return locales
def _initialize():
+ if set_language.__doc__ is None:
+ # when running under 'python -OO', all __doc__ fields are None,
+ # so += would fail -- and this function would be unnecessary anyway.
+ return
languages = read_all_languages()
set_language.__doc__ += '\n'
for lang in languages: