From 9a96c26e32e45b62ee4d080514be8cd0658d2c54 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Fri, 24 Feb 2017 19:12:08 -0800 Subject: [PATCH] Except empty module_groups module_groups seems expected as empty on the code, but the extracting code specified actual keys(like 'openstack') in process_project_list(). This patch changes the method for an empty module_groups. NOTE: This code becomes necessary to use stackalytics locally. Change-Id: I8791829e5d6811a2d661a222eee5d95937c155fb --- stackalytics/processor/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stackalytics/processor/main.py b/stackalytics/processor/main.py index 4a2180f6a..573c4ccc8 100644 --- a/stackalytics/processor/main.py +++ b/stackalytics/processor/main.py @@ -281,11 +281,11 @@ def process_project_list(runtime_storage_inst): module_groups.update(official_module_groups) # make list of OpenStack unofficial projects - others = module_groups['openstack-others'] - off_rm = module_groups['openstack-official']['releases'] + others = module_groups.get('openstack-others') + off_rm = module_groups.get('openstack-official', {}).get('releases') official = dict((r, set(m)) for r, m in six.iteritems(off_rm)) - for module in module_groups['openstack']['modules']: + for module in module_groups.get('openstack', {}).get('modules', []): for r, off_m in six.iteritems(official): if module not in off_m: others['releases'][r].add(module)