From baeb2174c6102405b15031d7e2fa6b34e580c474 Mon Sep 17 00:00:00 2001 From: Phil Elson Date: Tue, 9 Feb 2016 14:48:02 +0000 Subject: [PATCH] A try..except is needed for registering TravisCI. --- conda_smithy/ci_register.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/conda_smithy/ci_register.py b/conda_smithy/ci_register.py index 1b7e5f19a..bd16496a3 100755 --- a/conda_smithy/ci_register.py +++ b/conda_smithy/ci_register.py @@ -134,8 +134,11 @@ def add_project_to_travis(user, project): response = requests.get(url, headers=headers) content = response.json() - found = [hooked for hooked in content['hooks'] - if hooked['owner_name'] == user and hooked['name'] == project] + try: + found = [hooked for hooked in content['hooks'] + if hooked['owner_name'] == user and hooked['name'] == project] + except KeyError: + pass if not found: if count == 1: