From 23b40260b54a2699fc3c7fe1abf3c9ebffb58834 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Mon, 27 Feb 2017 14:53:14 -0800 Subject: [PATCH] Allow nonexistent releases in default_data Each "repos" data can contain the list of releases. If not containing releases, TypeError happens on current code. This patch makes the code allow nonexistent releases instead of the exception. Change-Id: I264784bdfbd016cbd0225a0604d03acfe5ecf967 --- stackalytics/processor/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stackalytics/processor/main.py b/stackalytics/processor/main.py index c6518958b..4dcde72c4 100644 --- a/stackalytics/processor/main.py +++ b/stackalytics/processor/main.py @@ -111,7 +111,7 @@ def _process_repo(repo, runtime_storage_inst, record_processor_inst, vcs_inst.fetch() branches = {repo.get('default_branch', 'master')} - for release in repo.get('releases'): + for release in repo.get('releases', []): if 'branch' in release: branches.add(release['branch'])