Permalink
Browse files

handles error if not authenticated

  • Loading branch information...
simsong committed Dec 8, 2012
1 parent 011f0b1 commit 6e33f1b1bfd80173dbb5d2aa5f34a7730032fbd8
Showing with 2 additions and 0 deletions.
  1. +2 −0 issues.py
View
@@ -128,6 +128,8 @@ def handle_tracker_item(item, issue_title_prefix):
print "ISSUE CAUSED SERVER SIDE ERROR AND WAS NOT SAVED!!! Import will continue."
else:
issue = response.json
+ if 'number' not in issue:
+ raise RuntimeError("No 'number' in issue; response %d invalid" % response.status_code)
number = issue['number']
print 'Attaching labels: %s' % labels
rest_call('POST', 'issues/%s/labels' % (number), labels)

0 comments on commit 6e33f1b

Please sign in to comment.