)]}'
{"neutron/api/v2/resource.py":[{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"c07f123988a128db2c49c733e47236a48e301a8c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            body \u003d serializer.serialize({\u0027NeutronError\u0027: err_data})"},{"line_number":106,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":107,"context_line":"            raise mapped_exc(**kwargs)"},{"line_number":108,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":109,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":110,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":111,"context_line":"            translate(e, language)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F%2Ffw%3D","line":108,"updated":"2014-03-02 21:15:07.000000000","message":"curious - whats the reason we don\u0027t use excutils here?","commit_id":"6b13ee0c3b446b7fc4f440dd58c9226bf4abfdf8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"23c81a9b5d5f37770bc798c05bb7f37b4cee3e13","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            body \u003d serializer.serialize({\u0027NeutronError\u0027: err_data})"},{"line_number":106,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":107,"context_line":"            raise mapped_exc(**kwargs)"},{"line_number":108,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":109,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":110,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":111,"context_line":"            translate(e, language)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F%2BBo%3D","line":108,"in_reply_to":"AAAAVn%2F%2F%2BFA%3D","updated":"2014-03-03 04:18:27.000000000","message":"Thanks for understanding.\n\nThere is no similar implementation in neutron, but other projects must have the similar points. It seems I should check other projects.\nAlso it seems better to confirm oslo team if we can change an exception context in save_and_reraise_exc.  I will check them after Icehouse-3 review rush.","commit_id":"6b13ee0c3b446b7fc4f440dd58c9226bf4abfdf8"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"5ac3ba551af5ac2f3a39a308f8db66c7078309f5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            body \u003d serializer.serialize({\u0027NeutronError\u0027: err_data})"},{"line_number":106,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":107,"context_line":"            raise mapped_exc(**kwargs)"},{"line_number":108,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":109,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":110,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":111,"context_line":"            translate(e, language)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F%2BFA%3D","line":108,"in_reply_to":"AAAAVn%2F%2F%2BRU%3D","updated":"2014-03-03 04:01:51.000000000","message":"I understand better based on Akihiro\u0027s explanation. Given that this is the only place that we might have to make an exception I am fine either ways.","commit_id":"6b13ee0c3b446b7fc4f440dd58c9226bf4abfdf8"},{"author":{"_account_id":9560,"name":"Lee Li","email":"lilinguo8212@gmail.com","username":"llg8212"},"change_message_id":"6ad6669febe2a5f628a3984c6cf4d121dfb194f0","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            body \u003d serializer.serialize({\u0027NeutronError\u0027: err_data})"},{"line_number":106,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":107,"context_line":"            raise mapped_exc(**kwargs)"},{"line_number":108,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":109,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":110,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":111,"context_line":"            translate(e, language)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F%2BRU%3D","line":108,"in_reply_to":"AAAAVn%2F%2F%2BXc%3D","updated":"2014-03-03 03:26:31.000000000","message":"Have not found the similar implement, but I think it\u0027s worth to have a try. Thanks.","commit_id":"6b13ee0c3b446b7fc4f440dd58c9226bf4abfdf8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"871ed263601c9fbbed0844e2e5f08e440dfcdc72","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            body \u003d serializer.serialize({\u0027NeutronError\u0027: err_data})"},{"line_number":106,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":107,"context_line":"            raise mapped_exc(**kwargs)"},{"line_number":108,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":109,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":110,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":111,"context_line":"            translate(e, language)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F%2BXc%3D","line":108,"in_reply_to":"AAAAVn%2F%2F%2BbM%3D","updated":"2014-03-03 02:58:46.000000000","message":"save_and_reraise_exception use the saved exception context to reraise the exception. Here we want to replace the exception message to translated one. In my understanding, I need to change the variable (ctxt.value) inside save_and_reraise_exception to do so.\nAre suggesting to do so like below?\n(The only reason I didn\u0027t do is it is not described in excutils docstring and undocumented interface may be changed.)\n\n  except webob.exc.HTTPExcetption as e:\n    with excutils.save_and_reraise_excetpion() as ctxt:\n      LOG.exception(_(\u0027%s failed\u0027), action)\n      translate(e, language)\n      ctxt.value.body \u003d serialize({\u0027NeutronError\u0027, e})\n      ctxt.value.content_type \u003d content_type","commit_id":"6b13ee0c3b446b7fc4f440dd58c9226bf4abfdf8"},{"author":{"_account_id":9560,"name":"Lee Li","email":"lilinguo8212@gmail.com","username":"llg8212"},"change_message_id":"beb78684c8de57677d1af0f16b6c1ca6361e33b4","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            body \u003d serializer.serialize({\u0027NeutronError\u0027: err_data})"},{"line_number":106,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":107,"context_line":"            raise mapped_exc(**kwargs)"},{"line_number":108,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":109,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":110,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":111,"context_line":"            translate(e, language)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F%2BbM%3D","line":108,"in_reply_to":"AAAAVn%2F%2F%2Ffw%3D","updated":"2014-03-03 02:38:01.000000000","message":"I agree. It\u0027s easy to use excutils.save_and_reraise_exception and reduce redundant code.","commit_id":"6b13ee0c3b446b7fc4f440dd58c9226bf4abfdf8"}]}
