)]}'
{"keystoneclient/middleware/auth_token.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f77e045357a271f654333bc47fe3f8502bde755c","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                response \u003d conn.getresponse()"},{"line_number":469,"context_line":"                body \u003d response.read()"},{"line_number":470,"context_line":"                break"},{"line_number":471,"context_line":"            except Exception, e:"},{"line_number":472,"context_line":"                if retry \u003d\u003d RETRIES:"},{"line_number":473,"context_line":"                    self.LOG.error(\u0027HTTP connection exception: %s\u0027 % e)"},{"line_number":474,"context_line":"                    raise ServiceError(\u0027Unable to communicate with keystone\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F5%2Bg%3D","line":471,"updated":"2013-03-06 23:17:45.000000000","message":"why change from \"as e\" to \", e\"? python docs say \"as e\" is the \"modern\" way.","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"fef56c3bc6f612303ad457e559a24a03978d7581","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                response \u003d conn.getresponse()"},{"line_number":469,"context_line":"                body \u003d response.read()"},{"line_number":470,"context_line":"                break"},{"line_number":471,"context_line":"            except Exception, e:"},{"line_number":472,"context_line":"                if retry \u003d\u003d RETRIES:"},{"line_number":473,"context_line":"                    self.LOG.error(\u0027HTTP connection exception: %s\u0027 % e)"},{"line_number":474,"context_line":"                    raise ServiceError(\u0027Unable to communicate with keystone\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F37E%3D","line":471,"in_reply_to":"AAAAN3%2F%2F4%2FU%3D","updated":"2013-03-08 00:35:56.000000000","message":"just because i copied old code. Will fix.","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"13546c10947d12d5ff035e8068d2bdcb9f44ff95","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                response \u003d conn.getresponse()"},{"line_number":469,"context_line":"                body \u003d response.read()"},{"line_number":470,"context_line":"                break"},{"line_number":471,"context_line":"            except Exception, e:"},{"line_number":472,"context_line":"                if retry \u003d\u003d RETRIES:"},{"line_number":473,"context_line":"                    self.LOG.error(\u0027HTTP connection exception: %s\u0027 % e)"},{"line_number":474,"context_line":"                    raise ServiceError(\u0027Unable to communicate with keystone\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F4%2FU%3D","line":471,"in_reply_to":"AAAAN3%2F%2F5%2Bg%3D","updated":"2013-03-07 14:25:40.000000000","message":"+1; is there a more specific exception we could check for here? I definitely don\u0027t want to be retrying if we get back a 401 or something else \"normal\", for example (although I don\u0027t think this will).","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f77e045357a271f654333bc47fe3f8502bde755c","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                if retry \u003d\u003d RETRIES:"},{"line_number":473,"context_line":"                    self.LOG.error(\u0027HTTP connection exception: %s\u0027 % e)"},{"line_number":474,"context_line":"                    raise ServiceError(\u0027Unable to communicate with keystone\u0027)"},{"line_number":475,"context_line":"                # NOTE(vish): sleep 0.5, 1, 2"},{"line_number":476,"context_line":"                self.LOG.warn(\u0027Retrying on HTTP connection exception: %s\u0027 % e)"},{"line_number":477,"context_line":"                time.sleep(2 ** retry / 2)"},{"line_number":478,"context_line":"                retry +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F5%2BI%3D","line":475,"updated":"2013-03-06 23:17:45.000000000","message":"This comment is not accurate.\n\n \u003e\u003e\u003e for retry in [0, 1, 2]:\n ...     print (2 ** retry / 2)\n ...\n 0\n 1\n 2\n\nmight be easier and more obvious to have an array of retry times.","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"13546c10947d12d5ff035e8068d2bdcb9f44ff95","unresolved":false,"context_lines":[{"line_number":474,"context_line":"                    raise ServiceError(\u0027Unable to communicate with keystone\u0027)"},{"line_number":475,"context_line":"                # NOTE(vish): sleep 0.5, 1, 2"},{"line_number":476,"context_line":"                self.LOG.warn(\u0027Retrying on HTTP connection exception: %s\u0027 % e)"},{"line_number":477,"context_line":"                time.sleep(2 ** retry / 2)"},{"line_number":478,"context_line":"                retry +\u003d 1"},{"line_number":479,"context_line":"            finally:"},{"line_number":480,"context_line":"                conn.close()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F4%2FI%3D","line":477,"updated":"2013-03-07 14:25:40.000000000","message":"Changing something here to a float will result in the desired behavior\n\n  \u003e\u003e\u003e [2.0 ** x / 2 for x in range(0, 3)]\n  [0.5, 1.0, 2.0]","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"fef56c3bc6f612303ad457e559a24a03978d7581","unresolved":false,"context_lines":[{"line_number":474,"context_line":"                    raise ServiceError(\u0027Unable to communicate with keystone\u0027)"},{"line_number":475,"context_line":"                # NOTE(vish): sleep 0.5, 1, 2"},{"line_number":476,"context_line":"                self.LOG.warn(\u0027Retrying on HTTP connection exception: %s\u0027 % e)"},{"line_number":477,"context_line":"                time.sleep(2 ** retry / 2)"},{"line_number":478,"context_line":"                retry +\u003d 1"},{"line_number":479,"context_line":"            finally:"},{"line_number":480,"context_line":"                conn.close()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F37A%3D","line":477,"in_reply_to":"AAAAN3%2F%2F4%2FI%3D","updated":"2013-03-08 00:35:56.000000000","message":"good point will switch to 2.0","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f77e045357a271f654333bc47fe3f8502bde755c","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                # NOTE(vish): sleep 0.5, 1, 2"},{"line_number":526,"context_line":"                self.LOG.warn(\u0027Retrying on HTTP connection exception: %s\u0027 % e)"},{"line_number":527,"context_line":"                time.sleep(2 ** retry / 2)"},{"line_number":528,"context_line":"                retry +\u003d 1"},{"line_number":529,"context_line":"            finally:"},{"line_number":530,"context_line":"                conn.close()"},{"line_number":531,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F598%3D","line":528,"updated":"2013-03-06 23:17:45.000000000","message":"suggest combine copied code into a function.","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"13546c10947d12d5ff035e8068d2bdcb9f44ff95","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                # NOTE(vish): sleep 0.5, 1, 2"},{"line_number":526,"context_line":"                self.LOG.warn(\u0027Retrying on HTTP connection exception: %s\u0027 % e)"},{"line_number":527,"context_line":"                time.sleep(2 ** retry / 2)"},{"line_number":528,"context_line":"                retry +\u003d 1"},{"line_number":529,"context_line":"            finally:"},{"line_number":530,"context_line":"                conn.close()"},{"line_number":531,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F4%2B4%3D","line":528,"in_reply_to":"AAAAN3%2F%2F598%3D","updated":"2013-03-07 14:25:40.000000000","message":"+1; looks like the only difference is the args to conn.request, which could be abstracted","commit_id":"c12636154dea0e99518f60289317bbf1113b5329"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"89bac0a39f34fee53ed937fe997653f224d9a0ae","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        \"\"\""},{"line_number":461,"context_line":"        conn \u003d self._get_http_connection()"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        RETRIES \u003d 3"},{"line_number":464,"context_line":"        retry \u003d 0"},{"line_number":465,"context_line":"        while True:"},{"line_number":466,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F33A%3D","line":463,"updated":"2013-03-08 01:10:29.000000000","message":"Should this value can be given as an option/parameter from config?","commit_id":"70d1a2203f3840cb36a82a04813ed31e37546be6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8a7d115a4579fbd766c5703ed9aec45ceb2a6bdc","unresolved":false,"context_lines":[{"line_number":527,"context_line":"                time.sleep(2.0 ** retry / 2)"},{"line_number":528,"context_line":"                retry +\u003d 1"},{"line_number":529,"context_line":"            finally:"},{"line_number":530,"context_line":"                conn.close()"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        try:"},{"line_number":533,"context_line":"            data \u003d jsonutils.loads(body)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F2SA%3D","line":530,"updated":"2013-03-08 22:34:50.000000000","message":"this duplicated code should be moved into a function, see comments on patch set 2.","commit_id":"70d1a2203f3840cb36a82a04813ed31e37546be6"}]}
