)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"171bb500dc1c2fce731f6fefd3783c19fb3ee1ad","unresolved":false,"context_lines":[{"line_number":9,"context_line":"get_wrapped_function() assumes that any function which is a closure is a"},{"line_number":10,"context_line":"decorator, and therefore has a function argument. This assumption fails"},{"line_number":11,"context_line":"when the function is just a regular closure, and we end up falling"},{"line_number":12,"context_line":"through and returning None."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I18da02d83fd9884e2e8c2173acf124140bd43525"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1f1a1f67_76becab4","line":12,"updated":"2017-07-17 22:34:53.000000000","message":"I guess I should understand this, but I don\u0027t, even after looking at the code for a couple minutes.\n\nCan you give an example here?","commit_id":"4c6831d1b15d44d3edaa6e0ce4777f04a8e4e6ef"}],"nova/safe_utils.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e54cef2de699098dd7fa39891dccb05da75f9d96","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            elif hasattr(closure.cell_contents, \u0027__call__\u0027):"},{"line_number":37,"context_line":"                return closure.cell_contents"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        return function"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    return _get_wrapped_function(function)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_76c48af5","line":39,"updated":"2017-07-17 22:46:37.000000000","message":"I also don\u0027t understand what this is fixing (though it seems like the change makes sense to return function if all else fails).\n\nI tried writing a unit test like this, but it passed without your change:\n\n    def test_unwrapped(self):\n        def unwrapped(self, instance, red\u003dNone, blue\u003dNone):\n            pass\n\n        func \u003d safe_utils.get_wrapped_function(unwrapped)\n        func_code \u003d func.__code__\n        self.assertEqual(4, len(func_code.co_varnames))\n        self.assertIn(\u0027self\u0027, func_code.co_varnames)\n        self.assertIn(\u0027instance\u0027, func_code.co_varnames)\n        self.assertIn(\u0027red\u0027, func_code.co_varnames)\n        self.assertIn(\u0027blue\u0027, func_code.co_varnames)","commit_id":"4c6831d1b15d44d3edaa6e0ce4777f04a8e4e6ef"}]}
