[webconfig] cleanly handles ``fckeditor_installed`` when no uiprops
The previous version of the code relied on a default value with a dummy
``FCKEDITOR_PATH`` entry. The new code check if uiprops is initialized or not.
--- a/web/webconfig.py Mon Apr 08 16:19:29 2013 +0200
+++ b/web/webconfig.py Mon Apr 08 16:43:26 2013 +0200
@@ -81,7 +81,6 @@
"""
cubicweb_appobject_path = CubicWebConfiguration.cubicweb_appobject_path | set([join('web', 'views')])
cube_appobject_path = CubicWebConfiguration.cube_appobject_path | set(['views'])
- uiprops = {'FCKEDITOR_PATH': ''}
options = merge_options(CubicWebConfiguration.options + (
('repository-uri',
@@ -244,7 +243,9 @@
self.https_datadir_url = None
def fckeditor_installed(self):
- return exists(self.uiprops['FCKEDITOR_PATH'])
+ if self.uiprops is None:
+ return False
+ return exists(self.uiprops.get('FCKEDITOR_PATH', ''))
def cwproperty_definitions(self):
for key, pdef in super(WebConfiguration, self).cwproperty_definitions():