# HG changeset patch # User Pierre-Yves David # Date 1365432206 -7200 # Node ID c9d18b8dbfea0f69e0fa4618abb641833c930467 # Parent a46197b1696f8d0d1f374b22f8b038b2c5d90ce2 [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. diff -r a46197b1696f -r c9d18b8dbfea web/webconfig.py --- 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():