)]}'
{"glance_store/_drivers/http.py":[{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"12f63b2c93db3086b12d0b420bd2c7a1446a4ec4","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            size \u003d self._query(location, \u0027HEAD\u0027)[2]"},{"line_number":170,"context_line":"        except (socket.error, http_client.BadStatusLine):"},{"line_number":171,"context_line":"            reason \u003d _(\"The HTTP URL is invalid.\")"},{"line_number":172,"context_line":"            LOG.info(reason)"},{"line_number":173,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_dd8fa921","line":170,"updated":"2015-12-04 22:38:18.000000000","message":"How about catching HTTPException in general ? Also, I think we should log the actual exception instead of just \"The Http URL is invalid\" to give more information to the operator.","commit_id":"68f87274aacde88234079f708e76fc960ea8254e"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"5084c45a4d7a9d1648cd09c3e69bbf1871568863","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            size \u003d self._query(location, \u0027HEAD\u0027)[2]"},{"line_number":170,"context_line":"        except (socket.error, http_client.BadStatusLine):"},{"line_number":171,"context_line":"            reason \u003d _(\"The HTTP URL is invalid.\")"},{"line_number":172,"context_line":"            LOG.info(reason)"},{"line_number":173,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_e2f97981","line":170,"in_reply_to":"7a740942_dd8fa921","updated":"2015-12-16 14:10:56.000000000","message":"Why not puting the original error message in the new message?\n\n_(\"The HTTP URL is invalid: %s\") % exc\n\nIn this case, I think that it would be ok to catch the base HTTPException class.","commit_id":"68f87274aacde88234079f708e76fc960ea8254e"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a4ad6f7da4836e0ed88d43e47564eb12284e1622","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            size \u003d self._query(location, \u0027HEAD\u0027)[2]"},{"line_number":170,"context_line":"        except (socket.error, http_client.BadStatusLine):"},{"line_number":171,"context_line":"            reason \u003d _(\"The HTTP URL is invalid.\")"},{"line_number":172,"context_line":"            LOG.info(reason)"},{"line_number":173,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_23dd7514","line":170,"in_reply_to":"7a740942_dd8fa921","updated":"2015-12-10 13:57:21.000000000","message":"You\u0027re right, we may want to catch HTTPException. Now it seems a bit hard to give a really helpful message (better than \"we caught \u003cthis exception\u003e\"). For instance, BadStatusLine is \"raised if a server responds with a HTTP status code that we don’t understand\" (https://docs.python.org/2/library/httplib.html#httplib.HTTPException).","commit_id":"68f87274aacde88234079f708e76fc960ea8254e"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a4ad6f7da4836e0ed88d43e47564eb12284e1622","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        except Exception:"},{"line_number":177,"context_line":"            # NOTE(flaper87): Catch more granular exceptions,"},{"line_number":178,"context_line":"            # keeping this branch for backwards compatibility."},{"line_number":179,"context_line":"            return 0"},{"line_number":180,"context_line":"        return size"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def _query(self, location, verb, depth\u003d0):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_a613b35b","line":179,"updated":"2015-12-10 13:57:21.000000000","message":"About this note: do we really have a lot of projects that rely on this behaviour? I really do not think so (http://codesearch.openstack.org/?q\u003dglance-store\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d). Maybe we could remove this final branch in this patch. WDYT?","commit_id":"68f87274aacde88234079f708e76fc960ea8254e"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"d2e45b6da4b668dd0a8c3536e5b08ce5d417e00b","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            size \u003d self._query(location, \u0027HEAD\u0027)[2]"},{"line_number":170,"context_line":"        except (socket.error, http_client.HTTPException) as exc:"},{"line_number":171,"context_line":"            reason \u003d _(\"The HTTP URL is invalid: %s\") % exc"},{"line_number":172,"context_line":"            LOG.info(reason)"},{"line_number":173,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"},{"line_number":174,"context_line":"        except exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_8f570b57","line":171,"updated":"2016-01-07 02:11:46.000000000","message":"Please wrap with utils.exception_to_str(exc) from glance_store.common.utils module.","commit_id":"13a8b05c813a06d527e3c65407d28a22c93b7701"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"31fd94329d989a0fc1f701963f8d8f32241ebe51","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            size \u003d self._query(location, \u0027HEAD\u0027)[2]"},{"line_number":170,"context_line":"        except (socket.error, http_client.HTTPException) as exc:"},{"line_number":171,"context_line":"            reason \u003d _(\"The HTTP URL is invalid: %s\") % exc"},{"line_number":172,"context_line":"            LOG.info(reason)"},{"line_number":173,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"},{"line_number":174,"context_line":"        except exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_42147de7","line":171,"in_reply_to":"fa69d971_8f570b57","updated":"2016-01-07 08:49:13.000000000","message":"Oh, I updated Glance to replace its exception_to_str() function with exception_to_unicode() of oslo.utils, but I forgot to update glance_store.\n\nI just wrote a patch: https://review.openstack.org/#/c/264666/","commit_id":"13a8b05c813a06d527e3c65407d28a22c93b7701"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"6c2f73c19894037d317d64f38a5fb40eb53191e6","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            reason \u003d _(\"The HTTP URL is invalid: %s\") % err_msg"},{"line_number":174,"context_line":"            LOG.info(reason)"},{"line_number":175,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"},{"line_number":176,"context_line":"        except exceptions.NotFound:"},{"line_number":177,"context_line":"            raise"},{"line_number":178,"context_line":"        return size"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_7e3f6cd6","line":176,"updated":"2016-01-22 04:11:11.000000000","message":"This stmt is now redundant. We can remove it.","commit_id":"a0620e195db0604aaa7c9fd12930c10dbe2e7b0d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"f06cd217b9ed5c8a898cf4b9758756d57aa650ca","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            reason \u003d _(\"The HTTP URL is invalid: %s\") % err_msg"},{"line_number":174,"context_line":"            LOG.info(reason)"},{"line_number":175,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"},{"line_number":176,"context_line":"        except exceptions.NotFound:"},{"line_number":177,"context_line":"            raise"},{"line_number":178,"context_line":"        return size"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_df3be8cf","line":176,"in_reply_to":"9a68dd71_7e3f6cd6","updated":"2016-01-22 09:59:44.000000000","message":"NotFound doesn\u0027t inherit from HTTPException. I don\u0027t think that it\u0027s safe to remove it.","commit_id":"a0620e195db0604aaa7c9fd12930c10dbe2e7b0d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"1122581f769bd6bea66aeb0e7b66d892f9c25cc8","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            reason \u003d _(\"The HTTP URL is invalid: %s\") % err_msg"},{"line_number":174,"context_line":"            LOG.info(reason)"},{"line_number":175,"context_line":"            raise exceptions.BadStoreUri(message\u003dreason)"},{"line_number":176,"context_line":"        except exceptions.NotFound:"},{"line_number":177,"context_line":"            raise"},{"line_number":178,"context_line":"        return size"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_c3a8dc8f","line":176,"in_reply_to":"9a68dd71_df3be8cf","updated":"2016-01-22 17:53:10.000000000","message":"I should have been clear. We removed the generic exception handling below, so all exceptions are being raised now. We don\u0027t need to catch exceptions.NotFound just to re-raise it.","commit_id":"a0620e195db0604aaa7c9fd12930c10dbe2e7b0d"}]}
