graydon / bors

Integration robot for buildbot and github
426 stars 49 forks source link

bors' version of github.py sometimes has json related tracebacks #12

Open bhearsum opened 11 years ago

bhearsum commented 11 years ago

Hit this today: 2013-07-25 09:03:01 PDT - INFO - ---------- starting run ---------- 2013-07-25 09:03:01 PDT - INFO - loading bors.cfg 2013-07-25 09:03:01 PDT - INFO - loading pull reqs (page 1) 2013-07-25 09:03:03 PDT - INFO - loading pull reqs (page 2) 2013-07-25 09:03:03 PDT - INFO - loading pull and issue comments on pull #620 2013-07-25 09:03:05 PDT - INFO - loading head comments on sonwow/servo/bindings = 65d2ea2f 2013-07-25 09:03:06 PDT - INFO - loading statuses of sonwow/servo/bindings = 65d2ea2f 2013-07-25 09:03:06 PDT - INFO - loading mergeability of 620 2013-07-25 09:03:07 PDT - INFO - loading pull and issue comments on pull #619 Traceback (most recent call last): File "/builds/bors/servo/bin/bors", line 9, in load_entry_point('bors==1.1', 'console_scripts', 'bors')() File "/builds/bors/servo/lib/python2.7/site-packages/bors.py", line 548, in main all_pulls ] File "/builds/bors/servo/lib/python2.7/site-packages/bors.py", line 219, in init self.get_pull_comments() File "/builds/bors/servo/lib/python2.7/site-packages/bors.py", line 241, in get_pull_comments cs = (self.dst().pulls(self.num).comments().get() File "/builds/bors/servo/lib/python2.7/site-packages/github.py", line 184, in call return self._gh._http(self._method, self._path, **kw) File "/builds/bors/servo/lib/python2.7/site-packages/github.py", line 158, in _http resp = JsonObject(code=e.code, json=json) UnboundLocalError: local variable 'json' referenced before assignment

bhearsum commented 11 years ago

Looks like a pretty obvious bug in github.py that will be hit anytime is_json is false: https://github.com/graydon/bors/blob/master/github.py#L155