Skip to content

Commit

Permalink
Merge pull request #55 from pelson/moving_ahead
Browse files Browse the repository at this point in the history
A try..except is needed for registering TravisCI.
  • Loading branch information
pelson committed Feb 9, 2016
2 parents a96146c + baeb217 commit d5b0d84
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions conda_smithy/ci_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d5b0d84

Please sign in to comment.