We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f5983d commit e6285c1Copy full SHA for e6285c1
git-pull-request
@@ -122,7 +122,12 @@ def show():
122
print
123
url = "http://github.com/api/v2/json/pulls/%s/open" % (repo)
124
req = urllib2.Request(url)
125
- response = urllib2.urlopen(req)
+ try:
126
+ response = urllib2.urlopen(req)
127
+ except urllib2.HTTPError, msg:
128
+ print "error loading pull requests for repo %s: %s" % (repo, msg)
129
+ exit(1)
130
+
131
data = response.read()
132
if (data == ''):
133
print "failed to speak with github."
@@ -150,7 +155,6 @@ def fetch(pullreq):
150
155
return 3
151
156
152
157
data = json.loads(data)
153
- #print json.dumps(data,sort_keys=True, indent=4)
154
158
pr = data['pull']
159
display(pr)
160
0 commit comments