summaryrefslogtreecommitdiff
path: root/openstack_dashboard/context_processors.py
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-07-07 11:33:40 +0000
committerAkihiro Motoki <amotoki@gmail.com>2017-07-07 11:33:40 +0000
commitf50cce4c1c337cf8d0fe355afe9a7db5a40d8d0b (patch)
treee076105187180aed64e79f2cfcd04310e0d33845 /openstack_dashboard/context_processors.py
parente9e1605c3d53d5a37682fc37af4239223f3703c4 (diff)
downloadhorizon-f50cce4c1c337cf8d0fe355afe9a7db5a40d8d0b.tar.gz
Fix KeyError for HORIZON_CONFIG['plugins'] in plugin UT
HORIZON_CONFIG['plugins'] does not always exist. It breaks unit tests of some horizon plugins like designate-dashboard. Change-Id: I23aae10a7e63494c1c9f656b47becd2f067c9058 Closes-Bug: #1702889
Diffstat (limited to 'openstack_dashboard/context_processors.py')
-rw-r--r--openstack_dashboard/context_processors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack_dashboard/context_processors.py b/openstack_dashboard/context_processors.py
index 424aae962..0a490a042 100644
--- a/openstack_dashboard/context_processors.py
+++ b/openstack_dashboard/context_processors.py
@@ -107,6 +107,6 @@ def get_js_catalog(conf):
# so we exclude them from the js_catalog
js_catalog = ['horizon', 'openstack_dashboard']
regex = re.compile(r'^openstack_dashboard')
- all_plugins = conf.HORIZON_CONFIG['plugins']
+ all_plugins = conf.HORIZON_CONFIG.get('plugins', [])
js_catalog.extend(p for p in all_plugins if not regex.search(p))
return '+'.join(js_catalog)