)]}'
{"jenkins/__init__.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1215931dc7de9685be6c03078b306ffbb5a79efa","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                self.crumb \u003d False"},{"line_number":187,"context_line":"            else:"},{"line_number":188,"context_line":"                if response is None:"},{"line_number":189,"context_line":"                    self.crumb \u003d False"},{"line_number":190,"context_line":"                else:"},{"line_number":191,"context_line":"                    self.crumb \u003d json.loads(response.decode(\u0027utf-8\u0027))"},{"line_number":192,"context_line":"        if self.crumb:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_8cd907f7","line":189,"updated":"2015-02-06 17:28:11.000000000","message":"Ah, that explains some errors I\u0027ve been seeing from jenkins-jobs…","commit_id":"930719a5480b54df97eee8e8ded3934195ca4502"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"b904c495035797a9f0e296faee2d1fba553d1f10","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                self.maybe_add_crumb(req)"},{"line_number":256,"context_line":"            response \u003d urlopen(req, timeout\u003dself.timeout).read()"},{"line_number":257,"context_line":"            if response is None:"},{"line_number":258,"context_line":"                raise JenkinsException(\"Error communicating with server[%s]: \""},{"line_number":259,"context_line":"                                       \"empty response\" % self.server)"},{"line_number":260,"context_line":"            return response"},{"line_number":261,"context_line":"        except HTTPError as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_a83dce2e","line":258,"updated":"2015-02-06 22:02:35.000000000","message":"I\u0027d strongly suggest taking the approach of the NotFoundException and raising a subclass of JenkinsException—call it EmptyResponseException.  That way, you can eliminate the \u0027if …: … else raise\" from maybe_add_crumb().","commit_id":"ccd9dda162ae8598368e170fc03dc470fce3c075"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0fc27db7c6c40bec1f5cf57947e0c465034c05d6","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                # Don\u0027t need crumbs"},{"line_number":192,"context_line":"                self.crumb \u003d False"},{"line_number":193,"context_line":"            except EmptyResponseException:"},{"line_number":194,"context_line":"                self.crumb \u003d False"},{"line_number":195,"context_line":"            except JenkinsException as e:"},{"line_number":196,"context_line":"                raise"},{"line_number":197,"context_line":"        if self.crumb:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_6603070e","line":194,"updated":"2015-02-06 22:41:13.000000000","message":"Combine the NotFoundException and EmptyResponseException:\n\n    except (NotFoundException, EmptyResponseException):\n        # Don\u0027t need crumbs\n        self.crumb \u003d False","commit_id":"abb3156752b404d9760d1e81addc645743f4426b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0fc27db7c6c40bec1f5cf57947e0c465034c05d6","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            except EmptyResponseException:"},{"line_number":194,"context_line":"                self.crumb \u003d False"},{"line_number":195,"context_line":"            except JenkinsException as e:"},{"line_number":196,"context_line":"                raise"},{"line_number":197,"context_line":"        if self.crumb:"},{"line_number":198,"context_line":"            req.add_header(self.crumb[\u0027crumbRequestField\u0027], self.crumb[\u0027crumb\u0027])"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_e60e1732","line":196,"updated":"2015-02-06 22:41:13.000000000","message":"If all you\u0027re going to do is re-raise, eliminate the whole \u0027except JenkinsException\u0027 clause.","commit_id":"abb3156752b404d9760d1e81addc645743f4426b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"952011a17fb57fa69cd1d503f487eb90a6907b4a","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            try:"},{"line_number":187,"context_line":"                response \u003d self.jenkins_open(Request("},{"line_number":188,"context_line":"                    self.server + CRUMB_URL), add_crumb\u003dFalse)"},{"line_number":189,"context_line":"                self.crumb \u003d json.loads(response.decode(\u0027utf-8\u0027))"},{"line_number":190,"context_line":"            except (NotFoundException, EmptyResponseException):"},{"line_number":191,"context_line":"                self.crumb \u003d False"},{"line_number":192,"context_line":"        if self.crumb:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_c1d9fdf5","line":189,"updated":"2015-02-06 23:39:02.000000000","message":"This could go back into the \u0027try\u0027 block\u0027s \u0027else\u0027 clause now…that would minimize the change.","commit_id":"41a6816a0c72dfa4f7a49e6613a228ee0ded9976"}],"tests/test_jenkins.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"952011a17fb57fa69cd1d503f487eb90a6907b4a","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @patch.object(jenkins.Jenkins, \u0027jenkins_open\u0027)"},{"line_number":130,"context_line":"    def test_maybe_add_crumb__empty_response(self, jenkins_mock):"},{"line_number":131,"context_line":"        \"Don\u0027t try to create crumb header from an empty response\""},{"line_number":132,"context_line":"        jenkins_mock.side_effect \u003d jenkins.EmptyResponseException(\"empty response\")"},{"line_number":133,"context_line":"        j \u003d jenkins.Jenkins(\u0027http://example.com/\u0027, \u0027test\u0027, \u0027test\u0027)"},{"line_number":134,"context_line":"        request \u003d jenkins.Request(\u0027http://example.com/job/TestJob\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_41ed0d8e","line":131,"updated":"2015-02-06 23:39:02.000000000","message":"I recommend against including docstrings in tests, as some frameworks report the docstring instead of the test method name.  That can make it difficult to track down the actual test that failed…","commit_id":"41a6816a0c72dfa4f7a49e6613a228ee0ded9976"}]}
