summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2011-12-13 21:02:00 (GMT)
committerJohn (J5) Palmieri <johnp@redhat.com>2011-12-13 21:02:00 (GMT)
commita807c369f94a51bdeff77d08979b1105d8b69fc5 (patch)
tree3837ed84d4f078cb4dbea814092be0a075fa81f9
parent7a0e16da31210ea9337158cf11fe63eeeaae37ac (diff)
downloadfedoracommunity-a807c369f94a51bdeff77d08979b1105d8b69fc5.zip
fedoracommunity-a807c369f94a51bdeff77d08979b1105d8b69fc5.tar.gz
fedoracommunity-a807c369f94a51bdeff77d08979b1105d8b69fc5.tar.xz
make sure custom_tw2_config member exists before using it
-rw-r--r--fedoracommunity/config/app_cfg.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/fedoracommunity/config/app_cfg.py b/fedoracommunity/config/app_cfg.py
index 64ba1b7..a2d1a6d 100644
--- a/fedoracommunity/config/app_cfg.py
+++ b/fedoracommunity/config/app_cfg.py
@@ -38,7 +38,8 @@ class FedoraCommunityConfig(AppConfig):
res_prefix = config.get('fedoracommunity.resource_path_prefix')
if res_prefix:
default_tw2_config['res_prefix'] = res_prefix
- default_tw2_config.update(self.custom_tw2_config)
+ if getattr(self, 'custon_tw2_config', None):
+ default_tw2_config.update(self.custom_tw2_config)
app = TwMiddleware(app, **default_tw2_config)
self.tw2_initialized = True
return app