)]}'
{"glance/notifier/notify_qpid.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"a2c13724a41c5681ad08561e0b84a00dbeccde05","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def error(self, msg):"},{"line_number":139,"context_line":"        self._send(\u0027error\u0027, msg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _send(self, priority, msg):"},{"line_number":142,"context_line":"        qpid_msg \u003d qpid.messaging.Message(content\u003dmsg)"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            self._sender(priority).send(qpid_msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F3oU%3D","line":141,"updated":"2013-04-16 08:34:30.000000000","message":"Hey,\n\nI wonder whether it would be better to merge this method into _sender, perhaps keeping this signature.","commit_id":"9f288a228b2d075740bc8aa207aa20a04c2b7eb7"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"a2c13724a41c5681ad08561e0b84a00dbeccde05","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        qpid_msg \u003d qpid.messaging.Message(content\u003dmsg)"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            self._sender(priority).send(qpid_msg)"},{"line_number":145,"context_line":"        except Exception:"},{"line_number":146,"context_line":"            LOG.exception(_(\u0027Notification error.  Priority: %(priority)s \u0027"},{"line_number":147,"context_line":"                            \u0027Message: %(msg)s\u0027 % locals()))"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F3oI%3D","line":145,"updated":"2013-04-16 08:34:30.000000000","message":"Hey :)\n\nThis seems a bit dangerous. Exception will catch everything that happens in _get_session, _sender and send, which leaves us with no way to properly handle errors.\n\nPls, read my first comment, I think it would be better to just merge both methods.","commit_id":"9f288a228b2d075740bc8aa207aa20a04c2b7eb7"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"a2c13724a41c5681ad08561e0b84a00dbeccde05","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        except Exception:"},{"line_number":146,"context_line":"            LOG.exception(_(\u0027Notification error.  Priority: %(priority)s \u0027"},{"line_number":147,"context_line":"                            \u0027Message: %(msg)s\u0027 % locals()))"},{"line_number":148,"context_line":"        finally:"},{"line_number":149,"context_line":"            self.connection.close()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F3oM%3D","line":148,"updated":"2013-04-16 08:34:30.000000000","message":"Here you\u0027re assuming the connection was established, but the exception above could have caught a connection error.\n\nI guess connection errors should be handled in the _get_session method.","commit_id":"9f288a228b2d075740bc8aa207aa20a04c2b7eb7"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"a8b1d816674f26e485ba97711629a5dd1b231479","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            self.connection \u003d None"},{"line_number":130,"context_line":"            self._open_connection()"},{"line_number":131,"context_line":"            session \u003d self.connection.session()"},{"line_number":132,"context_line":"            sender \u003d session.sender(address)"},{"line_number":133,"context_line":"            qpid_msg \u003d qpid.messaging.Message(content\u003dmsg)"},{"line_number":134,"context_line":"            sender.send(qpid_msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2F0Vk%3D","line":131,"updated":"2013-04-22 07:48:09.000000000","message":"Hey,\n\nis there a good reason why you took this out from _get_connection (old _get_session)?","commit_id":"1e98e108c057914a1e8b2ee2295c80db410b5ffa"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"3485edaa4814a26709ca3bb272439d544a2a4769","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            self.connection \u003d None"},{"line_number":130,"context_line":"            self._open_connection()"},{"line_number":131,"context_line":"            session \u003d self.connection.session()"},{"line_number":132,"context_line":"            sender \u003d session.sender(address)"},{"line_number":133,"context_line":"            qpid_msg \u003d qpid.messaging.Message(content\u003dmsg)"},{"line_number":134,"context_line":"            sender.send(qpid_msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Ftg0%3D","line":131,"in_reply_to":"AAAAOn%2F%2F0CY%3D","updated":"2013-04-26 16:31:21.000000000","message":"fair enough!","commit_id":"1e98e108c057914a1e8b2ee2295c80db410b5ffa"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"480fd68238a33d2218b309610f45e56c45208a0e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            self.connection \u003d None"},{"line_number":130,"context_line":"            self._open_connection()"},{"line_number":131,"context_line":"            session \u003d self.connection.session()"},{"line_number":132,"context_line":"            sender \u003d session.sender(address)"},{"line_number":133,"context_line":"            qpid_msg \u003d qpid.messaging.Message(content\u003dmsg)"},{"line_number":134,"context_line":"            sender.send(qpid_msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2F0CY%3D","line":131,"in_reply_to":"AAAAOn%2F%2F0Vk%3D","updated":"2013-04-22 16:49:41.000000000","message":"Originally I thought I would want to handle exceptions from _get_connection differently, but when I discovered that some exceptions from connection.open() still required the connection to be closed I switched to checking connection.opened() in the exception handler.  I left it this way because I realized that except for this one line everything in that function was actually about opening the connection, so I thought this made more sense anyway.","commit_id":"1e98e108c057914a1e8b2ee2295c80db410b5ffa"}],"glance/tests/unit/test_notifier.py":[{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"405e12ee75f05e6e5401739bab0465667a16ffe5","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                            \u0027\"create\": \"always\"}\u0027 % priority)"},{"line_number":370,"context_line":"        self.mock_session.sender(expected_address).AndReturn("},{"line_number":371,"context_line":"                self.mock_sender)"},{"line_number":372,"context_line":"        if not exception:"},{"line_number":373,"context_line":"            self.mock_sender.send(mox.IgnoreArg())"},{"line_number":374,"context_line":"        else:"},{"line_number":375,"context_line":"            # Simulate an error sending the message and verify that it is"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F92Q%3D","line":372,"updated":"2013-04-09 21:06:31.000000000","message":"I would suggest to flip this to check if exception first, avoids the not","commit_id":"766ed46d68b4ed97cc35e9258cea12ac9092879b"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"732131fb139e51a293dd8a920a180414e06cc81c","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                            \u0027\"create\": \"always\"}\u0027 % priority)"},{"line_number":370,"context_line":"        self.mock_session.sender(expected_address).AndReturn("},{"line_number":371,"context_line":"                self.mock_sender)"},{"line_number":372,"context_line":"        if not exception:"},{"line_number":373,"context_line":"            self.mock_sender.send(mox.IgnoreArg())"},{"line_number":374,"context_line":"        else:"},{"line_number":375,"context_line":"            # Simulate an error sending the message and verify that it is"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F904%3D","line":372,"in_reply_to":"AAAAOn%2F%2F92Q%3D","updated":"2013-04-09 21:16:23.000000000","message":"Done","commit_id":"766ed46d68b4ed97cc35e9258cea12ac9092879b"}]}
