Skip to content

Commit

Permalink
Fix hook request failure handling
Browse files Browse the repository at this point in the history
  • Loading branch information
praseodym committed May 13, 2013
1 parent 45c29da commit 8a948ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion captainhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
continue
## Get all existing hooks
hs = requests.get(hurl, auth=auth)
if not r.ok:
if not hs.ok:
print " Failed: ", name
continue
hj = json.loads(hs.text or hs.content)
Expand All @@ -74,3 +74,5 @@
print " Failed to set hook for ", name
else:
print " Hook already exists for ", name
else:
print " Failed: ", r

0 comments on commit 8a948ff

Please sign in to comment.