)]}'
{"glance/api/v2/image_data.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e9445ebf72bbc9cbd8cea6bd4f49fb2c6cf6b138","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg, request\u003dreq)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        except exception.NotFound as e:"},{"line_number":104,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dunicode(e))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        except exception.StorageFull as e:"},{"line_number":107,"context_line":"            msg \u003d _(\"Image storage media is full: %s\") % e"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2Fze4%3D","line":104,"updated":"2014-03-04 02:14:45.000000000","message":"need to change this as well?","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a801dc212d39761d4cd52466240e6d79b43bc080","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg, request\u003dreq)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        except exception.NotFound as e:"},{"line_number":104,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dunicode(e))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        except exception.StorageFull as e:"},{"line_number":107,"context_line":"            msg \u003d _(\"Image storage media is full: %s\") % e"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2FyCY%3D","line":104,"in_reply_to":"AAAAVn%2F%2Fze4%3D","updated":"2014-03-04 05:51:33.000000000","message":"Done","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"}],"glance/api/v2/images.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"370586ba186a739dca818180d1645d72486e93d6","unresolved":false,"context_lines":[{"line_number":293,"context_line":"    def _check_allowed(cls, image):"},{"line_number":294,"context_line":"        for key in cls._disallowed_properties:"},{"line_number":295,"context_line":"            if key in image:"},{"line_number":296,"context_line":"                msg \u003d _(\"Attribute \\\u0027%s\\\u0027 is read-only.\") % key"},{"line_number":297,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003dunicode(msg))"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def create(self, request):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BSQM%3D","line":296,"updated":"2014-02-22 09:57:21.000000000","message":"From you BP description, seems you planed to do this feature for both v1 and v2. So I think there are some similar changes in v1 api controller should be fixed also, for example https://review.openstack.org/#/c/71524/9/glance/api/v1/images.py . So what about we rebase this change on to #71524? It can enhance i18n support for end user (you expected) and service side log.\n\nAnyway, back to the review for this file, I think the change is incomplete, you may take a look: https://review.openstack.org/#/c/71524/9/glance/api/v2/images.py","commit_id":"7c35689cbbcc99d3a76ebdceb40e64e7723a6f9b"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0455ab45c2189ced95ea7a4615f3348c43f3cd7e","unresolved":false,"context_lines":[{"line_number":293,"context_line":"    def _check_allowed(cls, image):"},{"line_number":294,"context_line":"        for key in cls._disallowed_properties:"},{"line_number":295,"context_line":"            if key in image:"},{"line_number":296,"context_line":"                msg \u003d _(\"Attribute \\\u0027%s\\\u0027 is read-only.\") % key"},{"line_number":297,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003dunicode(msg))"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def create(self, request):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BSMU%3D","line":296,"in_reply_to":"AAAAUX%2F%2BSQM%3D","updated":"2014-02-22 11:15:52.000000000","message":"Cool, I have approved #72524 and will rebase this one after it\u0027s merged.","commit_id":"7c35689cbbcc99d3a76ebdceb40e64e7723a6f9b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e9445ebf72bbc9cbd8cea6bd4f49fb2c6cf6b138","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            except (exception.BadStoreUri, exception.DuplicateLocation) as bse:"},{"line_number":231,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dbse.msg)"},{"line_number":232,"context_line":"            except ValueError as ve:    # update image status failed."},{"line_number":233,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dve.msg)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def _do_add_locations(self, image, path_pos, value):"},{"line_number":236,"context_line":"        pos \u003d self._get_locations_op_pos(path_pos,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2Fzco%3D","line":233,"updated":"2014-03-04 02:14:45.000000000","message":"ValueError is not a GlanceException type, so \"msg\" is non-applicable for here IMO.","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a801dc212d39761d4cd52466240e6d79b43bc080","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            except (exception.BadStoreUri, exception.DuplicateLocation) as bse:"},{"line_number":231,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dbse.msg)"},{"line_number":232,"context_line":"            except ValueError as ve:    # update image status failed."},{"line_number":233,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dve.msg)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def _do_add_locations(self, image, path_pos, value):"},{"line_number":236,"context_line":"        pos \u003d self._get_locations_op_pos(path_pos,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2FyCk%3D","line":233,"in_reply_to":"AAAAVn%2F%2Fzco%3D","updated":"2014-03-04 05:51:33.000000000","message":"Oops, good catch.","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e9445ebf72bbc9cbd8cea6bd4f49fb2c6cf6b138","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        except (exception.BadStoreUri, exception.DuplicateLocation) as bse:"},{"line_number":246,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dbse.msg)"},{"line_number":247,"context_line":"        except ValueError as ve:    # update image status failed."},{"line_number":248,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dve.msg)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _do_remove_locations(self, image, path_pos):"},{"line_number":251,"context_line":"        pos \u003d self._get_locations_op_pos(path_pos,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2Fzc4%3D","line":248,"updated":"2014-03-04 02:14:45.000000000","message":"ditto","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a801dc212d39761d4cd52466240e6d79b43bc080","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        except (exception.BadStoreUri, exception.DuplicateLocation) as bse:"},{"line_number":246,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dbse.msg)"},{"line_number":247,"context_line":"        except ValueError as ve:    # update image status failed."},{"line_number":248,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dve.msg)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _do_remove_locations(self, image, path_pos):"},{"line_number":251,"context_line":"        pos \u003d self._get_locations_op_pos(path_pos,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2FyCg%3D","line":248,"in_reply_to":"AAAAVn%2F%2Fzc4%3D","updated":"2014-03-04 05:51:33.000000000","message":"Done","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"}],"glance/cmd/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6768e81ece7d4f8f3a732d38fd683c15375abfab","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from glance.openstack.common import gettextutils"},{"line_number":17,"context_line":"gettextutils.install(\u0027glance\u0027, lazy\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9h8%3D","line":17,"updated":"2014-02-08 09:37:01.000000000","message":"Can you pls tell me why we need this change? thanks.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d7140dcbbe1e9bf477895dbb891a47b94f722c96","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from glance.openstack.common import gettextutils"},{"line_number":17,"context_line":"gettextutils.install(\u0027glance\u0027, lazy\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fv9Q%3D","line":17,"in_reply_to":"AAAAUX%2F%2F0uI%3D","updated":"2014-02-11 02:44:29.000000000","message":"Hi Luis A. Garcia,\n\nThanks for you explaining, I must got confused before, this just is the foundation as what we try to improve in this BP. So @flwang, I felt more we\u0027d better use \"unicode(unicode(e))\"  in glance/image_cache/drivers/xattr.py to make a clear coding, and it will be nice if you can give a note comments: explain what\u0027s the purpose for first unicode() call and the second one..","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"cb19d6c7cf445fa40fb56823c11571b40b264b83","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from glance.openstack.common import gettextutils"},{"line_number":17,"context_line":"gettextutils.install(\u0027glance\u0027, lazy\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F0uI%3D","line":17,"in_reply_to":"AAAAUX%2F%2F5IA%3D","updated":"2014-02-10 15:51:24.000000000","message":"Hi Zhi Yan,\n\nlazy\u003dTrue installs a modified _ function that returns an untranslated Message object instead of returning a simple translated unicode object. \n\nThe Message class enables OpenStack to translate REST APIs and log files to multiple locales. For example, without it, when there is an error in the REST APIs users will always get an error in the locale that OpenStack is running on, but when lazy\u003dTrue users can actually say which locale they want their response in using the Accept-Language HTTP header and get the response in that locale. Also, users are able to use the gettextutils.TranslationHandler which enables users to create log files in different locales.\n\nHope that answers the question. \n\nThank you,","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"78b4e3f0cd8d8b0f124ef6b953f0499d2ff5a4d0","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from glance.openstack.common import gettextutils"},{"line_number":17,"context_line":"gettextutils.install(\u0027glance\u0027, lazy\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F5IA%3D","line":17,"in_reply_to":"AAAAUX%2F%2F9Uc%3D","updated":"2014-02-10 05:33:01.000000000","message":"Thanks for you explaining what is \"lzay\" but I\u0027m more interested in why we need it, may I know that? thanks again.\n\nIMO it seems like this is an overkill change for your requirement (I verified all test case successful without adding this flag) and actually this just is the root cause for the exception which we talked in [1], since this flag caused unicode() returns a Message object but a unicode string. (So I can fix it by \"set_attr(\u0027error\u0027, unicode(unicode(e)))\". Let me know what you think.\n\n[1] https://review.openstack.org/#/c/71398/2/glance/image_cache/drivers/xattr.py\n\nbtw, IFY, in the master codebase, I can successful change that line to \"set_attr(\u0027error\u0027, str(e))\"","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from glance.openstack.common import gettextutils"},{"line_number":17,"context_line":"gettextutils.install(\u0027glance\u0027, lazy\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Uc%3D","line":17,"in_reply_to":"AAAAUX%2F%2F9h8%3D","updated":"2014-02-08 14:30:38.000000000","message":"I\u0027m copying the comment of parameter \u0027lazy\u0027 to avoid any confusing.\n\n\u0027lazy\u0027 indicates whether or not to install the lazy _() function. The lazy _() introduces a way to do deferred translation of messages by installing a _ that builds Message objects, instead of strings, which can then be lazily translated into any available locale.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"}],"glance/cmd/api.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"06995eaf36c83fd11e702a0e50253f25e7ebe993","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import eventlet"},{"line_number":25,"context_line":"import os"},{"line_number":26,"context_line":"import six"},{"line_number":27,"context_line":"import sys"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Monkey patch socket, time, select, threads"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FcuQ%3D","line":26,"updated":"2014-02-26 15:30:16.000000000","message":"To put this line to a separated 3rd import group is better.","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"}],"glance/common/exception.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        super(GlanceException, self).__init__(msg_fmt)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __unicode__(self):"},{"line_number":58,"context_line":"        return self.message"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F93E%3D","line":58,"updated":"2014-02-08 09:34:46.000000000","message":"prefer do this, since upper layer code can pass own \"msg_fmt\" as a param in __init__(), which can be a ascii string.\n\n    return unicode(self.message)","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d1369f3ff6f8b83064ffee7a1ff2c7ea9aec2e6b","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        super(GlanceException, self).__init__(msg_fmt)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __unicode__(self):"},{"line_number":58,"context_line":"        return self.message"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F7JA%3D","line":58,"in_reply_to":"AAAAUX%2F%2F7hw%3D","updated":"2014-02-09 17:16:49.000000000","message":"So I think we need an uncode() call at here to make sure this function returns Unicode message string always as it designed.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        super(GlanceException, self).__init__(msg_fmt)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __unicode__(self):"},{"line_number":58,"context_line":"        return self.message"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Us%3D","line":58,"in_reply_to":"AAAAUX%2F%2F93E%3D","updated":"2014-02-08 14:30:38.000000000","message":"Did you mean the msg_fmt maybe passed in a non-ascii string? I don\u0027t think so, because it doesn\u0027t make sense to including any non-ascii string in Glance code. Make sense?","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"81d35903b6773bed3976603e650a45e6891f7160","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        super(GlanceException, self).__init__(msg_fmt)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __unicode__(self):"},{"line_number":58,"context_line":"        return self.message"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F7hw%3D","line":58,"in_reply_to":"AAAAUX%2F%2F9Hc%3D","updated":"2014-02-09 12:31:09.000000000","message":"Based on my understanding, we\u0027re not assuming the msg_fmt is an unicode string. Since it will be handled in the API level.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a67fbbc0d64364a732ed76ba9374f93e6ff0fb4a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        super(GlanceException, self).__init__(msg_fmt)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __unicode__(self):"},{"line_number":58,"context_line":"        return self.message"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Hc%3D","line":58,"in_reply_to":"AAAAUX%2F%2F9Us%3D","updated":"2014-02-08 15:17:44.000000000","message":"No, I just want to say upper layer can pass a *ascii* string at line #39, then this line will return a wrong encoded message string - non-unicode.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f30d9434e4a06997cc7f2101e762a53f0829366b","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    msg_fmt \u003d _(\"Redirecting to %(uri)s for authorization.\")"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class DatabaseMigrationError(GlanceException):"},{"line_number":161,"context_line":"    msg_fmt \u003d _(\"There was an error migrating the database.\")"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2FnLQ%3D","line":160,"updated":"2014-02-12 01:00:33.000000000","message":"remove this","commit_id":"25fbe0dcaeb0a5c61008c254d70dd662368960be"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ea63bb7c087d312f76eb1dd6a5457e21b7e704d9","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    msg_fmt \u003d _(\"Redirecting to %(uri)s for authorization.\")"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class DatabaseMigrationError(GlanceException):"},{"line_number":161,"context_line":"    msg_fmt \u003d _(\"There was an error migrating the database.\")"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2Fl8M%3D","line":160,"in_reply_to":"AAAAUX%2F%2FnLQ%3D","updated":"2014-02-12 06:01:14.000000000","message":"Oops, good catch.","commit_id":"25fbe0dcaeb0a5c61008c254d70dd662368960be"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"bc8f4a77021266bc2a730b6b4b328d545762bc8c","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"class InvalidImageStatusTransition(Invalid):"},{"line_number":349,"context_line":"    message \u003d _(\"Image status transition from %(cur_status)s to\""},{"line_number":350,"context_line":"                \" %(new_status)s is not allowed\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2FnX4%3D","line":349,"updated":"2014-02-12 00:15:09.000000000","message":"Is it OK to skip this one?","commit_id":"25fbe0dcaeb0a5c61008c254d70dd662368960be"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ea63bb7c087d312f76eb1dd6a5457e21b7e704d9","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"class InvalidImageStatusTransition(Invalid):"},{"line_number":349,"context_line":"    message \u003d _(\"Image status transition from %(cur_status)s to\""},{"line_number":350,"context_line":"                \" %(new_status)s is not allowed\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2Fl70%3D","line":349,"in_reply_to":"AAAAUX%2F%2FnX4%3D","updated":"2014-02-12 06:01:14.000000000","message":"Good catch, actually, per markwash\u0027s concern, I\u0027m going to revert these change.","commit_id":"25fbe0dcaeb0a5c61008c254d70dd662368960be"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"370586ba186a739dca818180d1645d72486e93d6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BSPo%3D","line":55,"updated":"2014-02-22 09:57:21.000000000","message":"I still think the previous approach is correct (https://review.openstack.org/#/c/71398/7/glance/common/exception.py ), am I miss anything?","commit_id":"7c35689cbbcc99d3a76ebdceb40e64e7723a6f9b"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"380d7bdcbad47baecda173a2b635b525e9070ac4","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BR%2BE%3D","line":55,"in_reply_to":"AAAAUX%2F%2BSHI%3D","updated":"2014-02-22 14:07:51.000000000","message":"zhiyan, sorry for the confusing. I think I should say \u0027not call the unicode() to convert it explicitly\u0027. Because it\u0027s an unicode compatible string. See https://github.com/openstack/glance/blob/master/glance/openstack/common/gettextutils.py#L113 and https://github.com/openstack/glance/blob/master/glance/openstack/common/gettextutils.py#L275","commit_id":"7c35689cbbcc99d3a76ebdceb40e64e7723a6f9b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"dc4dfcc19d0f603ad95b4c7d5f89c326ef249728","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BSHI%3D","line":55,"in_reply_to":"AAAAUX%2F%2BSMo%3D","updated":"2014-02-22 12:20:09.000000000","message":"As the interface definition of class.__unicode__ [1], it should return an unicode object in any case.\n\n[1] http://docs.python.org/2/reference/datamodel.html#object.__unicode__","commit_id":"7c35689cbbcc99d3a76ebdceb40e64e7723a6f9b"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0455ab45c2189ced95ea7a4615f3348c43f3cd7e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BSMo%3D","line":55,"in_reply_to":"AAAAUX%2F%2BSPo%3D","updated":"2014-02-22 11:15:52.000000000","message":"Nope, we should not convert it to unicode at here. Otherwise, we can\u0027t get correct Message object during translating.","commit_id":"7c35689cbbcc99d3a76ebdceb40e64e7723a6f9b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3fedd93096aa6433e7629f71a4b23d7a343b6408","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2F1U8%3D","line":55,"updated":"2014-02-24 15:40:30.000000000","message":"I really don\u0027t think it\u0027s a good way to go that we make the local code depends on the context logic/status or global structure, either for this case or in general. That just is the \"High-cohesion\" and \"Loose-coupling\" meaning of OOP programming as we know. So for example, if we don\u0027t check the global/context calling logic, here will be very confused to us, actually I just consider here is an obvious bug (as I said, if upper layer code pass a non-unicode/str \"message\" value at line #39 then __unicode__() will return a wrong type result and it will break the spec). As time passed I believe we will harder to remember clearly the logic around here.","commit_id":"c1a2e205d8404ec64da9b4ce9692ea9a59734876"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"38155679a490cc0bebd34c0e85e062a2b5b8c8d6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2Fr90%3D","line":55,"in_reply_to":"AAAAU3%2F%2F0jE%3D","updated":"2014-02-25 09:06:17.000000000","message":"My only concern here is whether `self.message` is guaranteed to be an unicode. We don\u0027t have any  enforcement to use unicode throughout glance so I think we need to make sure that here `self.msg` is unicode to avoid encoding issues.","commit_id":"c1a2e205d8404ec64da9b4ce9692ea9a59734876"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"5820658c602019bd35822c470fbb779d2fa01d8e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2F0jE%3D","line":55,"in_reply_to":"AAAAU3%2F%2F0k4%3D","updated":"2014-02-24 16:34:37.000000000","message":"BTW, I can add a note at here to clarify the type of self.msg to avoid the confusion issue if you think it\u0027s necessary.","commit_id":"c1a2e205d8404ec64da9b4ce9692ea9a59734876"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a1239cddb18e1aa6f320ba5403d04529e6e15ec7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def __unicode__(self):"},{"line_number":55,"context_line":"        return self.msg"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class MissingCredentialError(GlanceException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2F0k4%3D","line":55,"in_reply_to":"AAAAU3%2F%2F1U8%3D","updated":"2014-02-24 16:32:18.000000000","message":"I don\u0027t think so. The main goal why we\u0027re using _() is to enable the i18n. For example, if you don\u0027t know the i18n background, do you know what\u0027s the type of _()? You don\u0027t, so I don\u0027t think it\u0027s related to \"High-cohesion\" and \"Loose-coupling\"\n\nWe want to support i18n, right? So why do we want to see the rule is broken by somebody?\n\nIMHO, it\u0027s a reasonable way to avoid change a lot of current code, since we\u0027re using unicode(e) everywhere. And we can ensure our exception is unicode compatibility. Make sense?","commit_id":"c1a2e205d8404ec64da9b4ce9692ea9a59734876"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e1aa6d0863312849f3783fb1253b26a5fec62d9c","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __unicode__(self):"},{"line_number":56,"context_line":"        if not isinstance(self.msg, six.text_type):"},{"line_number":57,"context_line":"            self.msg \u003d six.text_type(self.msg)"},{"line_number":58,"context_line":"        return self.msg"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fitw%3D","line":57,"updated":"2014-02-26 02:11:04.000000000","message":"This just is my point.","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"be943f5882deb95f7c83d1dec65707bd770922bb","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __unicode__(self):"},{"line_number":56,"context_line":"        if not isinstance(self.msg, six.text_type):"},{"line_number":57,"context_line":"            self.msg \u003d six.text_type(self.msg)"},{"line_number":58,"context_line":"        return self.msg"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fh4c%3D","line":57,"in_reply_to":"AAAAU3%2F%2Fitw%3D","updated":"2014-02-26 04:18:17.000000000","message":"Glad to know your concern was addressed.","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f3bbb3104acd87b7e853f27c06d36073f7428f31","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __unicode__(self):"},{"line_number":56,"context_line":"        if not isinstance(self.msg, six.text_type):"},{"line_number":57,"context_line":"            self.msg \u003d six.text_type(self.msg)"},{"line_number":58,"context_line":"        return self.msg"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FcLQ%3D","line":57,"updated":"2014-02-26 16:19:07.000000000","message":"What do you think about using safe_decode (openstack/common/strutils/) ?","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"fa138a6fedc331b9294755a93a6249d4676cf616","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __unicode__(self):"},{"line_number":56,"context_line":"        if not isinstance(self.msg, six.text_type):"},{"line_number":57,"context_line":"            self.msg \u003d six.text_type(self.msg)"},{"line_number":58,"context_line":"        return self.msg"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FcFE%3D","line":57,"in_reply_to":"AAAAU3%2F%2FcLQ%3D","updated":"2014-02-26 16:26:24.000000000","message":"I would say nope. Because we\u0027d like to convert this msg if it\u0027s not unicode. But as for safe_decode, it will raise an TypeError if the input is not six.text_type, see https://github.com/openstack/glance/blob/master/glance/openstack/common/strutils.py#L105\n\nPlease let me know if I missed anything. Thanks for the comments, Flavio.","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e9445ebf72bbc9cbd8cea6bd4f49fb2c6cf6b138","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __unicode__(self):"},{"line_number":56,"context_line":"        # NOTE(flwang): By default, self.msg is an instance of Message, which"},{"line_number":57,"context_line":"        # can\u0027t be converted by str(). Based on the definition of"},{"line_number":58,"context_line":"        # __unicode__, it should return unicode always."},{"line_number":59,"context_line":"        return six.text_type(self.msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2FzSk%3D","line":56,"updated":"2014-03-04 02:14:45.000000000","message":"So do you think it will be cool if we hook __str__() at here to prevent upper layer code convert GlanceException object to string by str() under a non-applicable case? like raise an exception up.","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"c637923116348f222903207b6dbc9a89589d8c2d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __unicode__(self):"},{"line_number":56,"context_line":"        # NOTE(flwang): By default, self.msg is an instance of Message, which"},{"line_number":57,"context_line":"        # can\u0027t be converted by str(). Based on the definition of"},{"line_number":58,"context_line":"        # __unicode__, it should return unicode always."},{"line_number":59,"context_line":"        return six.text_type(self.msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2FxvQ%3D","line":56,"in_reply_to":"AAAAVn%2F%2FyBo%3D","updated":"2014-03-04 06:15:13.000000000","message":"I can see your point now. I will file a bug to track this change given the FF is coming :)\nThanks, zhiyan.","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a801dc212d39761d4cd52466240e6d79b43bc080","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        super(GlanceException, self).__init__(message)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __unicode__(self):"},{"line_number":56,"context_line":"        # NOTE(flwang): By default, self.msg is an instance of Message, which"},{"line_number":57,"context_line":"        # can\u0027t be converted by str(). Based on the definition of"},{"line_number":58,"context_line":"        # __unicode__, it should return unicode always."},{"line_number":59,"context_line":"        return six.text_type(self.msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2FyBo%3D","line":56,"in_reply_to":"AAAAVn%2F%2FzSk%3D","updated":"2014-03-04 05:51:33.000000000","message":"Thanks for the suggestion, zhiyan. But I prefer to handle it by https://github.com/openstack/oslo-incubator/blob/master/openstack/common/gettextutils.py#L303","commit_id":"f4c1826b57c9f9e69d1c588b9bff692bf63c6277"}],"glance/common/rpc.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        def validate(cmd):"},{"line_number":142,"context_line":"            if not isinstance(cmd, dict):"},{"line_number":143,"context_line":"                msg \u003d _(\"Bad Command: %s\") % unicode(cmd)"},{"line_number":144,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"            command, kwargs \u003d cmd.get(\"command\"), cmd.get(\"kwargs\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9vs%3D","line":143,"updated":"2014-02-08 09:34:46.000000000","message":"don\u0027t change this? (as we talked in irc)","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        def validate(cmd):"},{"line_number":142,"context_line":"            if not isinstance(cmd, dict):"},{"line_number":143,"context_line":"                msg \u003d _(\"Bad Command: %s\") % unicode(cmd)"},{"line_number":144,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"            command, kwargs \u003d cmd.get(\"command\"), cmd.get(\"kwargs\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9U4%3D","line":143,"in_reply_to":"AAAAUX%2F%2F9vs%3D","updated":"2014-02-08 14:30:38.000000000","message":"OK","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            if (not command or not isinstance(command, basestring) or"},{"line_number":149,"context_line":"                    (kwargs and not isinstance(kwargs, dict))):"},{"line_number":150,"context_line":"                msg \u003d _(\"Wrong command structure: %s\") % unicode(cmd)"},{"line_number":151,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            method \u003d self._registered.get(command)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9vw%3D","line":150,"updated":"2014-02-08 09:34:46.000000000","message":"ditto","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8d7dc5e4577bc07a2c33d8153118e8209d37c409","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            if (not command or not isinstance(command, basestring) or"},{"line_number":149,"context_line":"                    (kwargs and not isinstance(kwargs, dict))):"},{"line_number":150,"context_line":"                msg \u003d _(\"Wrong command structure: %s\") % (str(cmd))"},{"line_number":151,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            method \u003d self._registered.get(command)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Fv3A%3D","side":"PARENT","line":150,"updated":"2014-02-11 07:00:04.000000000","message":"I think can do an unrelated change in a separated patch, maybe nit.","commit_id":"20a819954499e6aec74332701860a3e18f63b692"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"068e5035bd13a9ecde3422b701ee098762ff864a","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            if (not command or not isinstance(command, basestring) or"},{"line_number":149,"context_line":"                    (kwargs and not isinstance(kwargs, dict))):"},{"line_number":150,"context_line":"                msg \u003d _(\"Wrong command structure: %s\") % (str(cmd))"},{"line_number":151,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            method \u003d self._registered.get(command)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FtXg%3D","side":"PARENT","line":150,"in_reply_to":"AAAAUX%2F%2Fv3A%3D","updated":"2014-02-11 10:14:23.000000000","message":"Make sense. I will revert it.","commit_id":"20a819954499e6aec74332701860a3e18f63b692"}],"glance/common/wsgi.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        # message, since message is what gets passed in at construction time"},{"line_number":596,"context_line":"        # in the API."},{"line_number":597,"context_line":"        if not isinstance(e.explanation, gettextutils.Message):"},{"line_number":598,"context_line":"            e.explanation \u003d str(e)"},{"line_number":599,"context_line":"            e.detail \u003d \u0027\u0027"},{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            e.explanation \u003d gettextutils.translate(e.explanation, locale)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9qM%3D","line":598,"updated":"2014-02-08 09:34:46.000000000","message":"May I know when we can meet this branch? thanks.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a67fbbc0d64364a732ed76ba9374f93e6ff0fb4a","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        # message, since message is what gets passed in at construction time"},{"line_number":596,"context_line":"        # in the API."},{"line_number":597,"context_line":"        if not isinstance(e.explanation, gettextutils.Message):"},{"line_number":598,"context_line":"            e.explanation \u003d str(e)"},{"line_number":599,"context_line":"            e.detail \u003d \u0027\u0027"},{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            e.explanation \u003d gettextutils.translate(e.explanation, locale)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9GY%3D","line":598,"in_reply_to":"AAAAUX%2F%2F9Kw%3D","updated":"2014-02-08 15:17:44.000000000","message":"looking forward to see that.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        # message, since message is what gets passed in at construction time"},{"line_number":596,"context_line":"        # in the API."},{"line_number":597,"context_line":"        if not isinstance(e.explanation, gettextutils.Message):"},{"line_number":598,"context_line":"            e.explanation \u003d str(e)"},{"line_number":599,"context_line":"            e.detail \u003d \u0027\u0027"},{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            e.explanation \u003d gettextutils.translate(e.explanation, locale)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Kw%3D","line":598,"in_reply_to":"AAAAUX%2F%2F9qM%3D","updated":"2014-02-08 14:30:38.000000000","message":"As I commented above, the explanation maybe not a Message, so we handle it specially. But I will improve this function a little bit. Thanks for the review.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":647,"context_line":"            action_result \u003d self.dispatch(self.controller, action,"},{"line_number":648,"context_line":"                                          request, **action_args)"},{"line_number":649,"context_line":"        except webob.exc.WSGIHTTPException as e:"},{"line_number":650,"context_line":"            raise translate_exception(request, e)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        try:"},{"line_number":653,"context_line":"            response \u003d webob.Response(request\u003drequest)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9qI%3D","line":650,"updated":"2014-02-08 09:34:46.000000000","message":"IMO https://review.openstack.org/#/c/71707/1/glance/common/wsgi.py approach is perfect (actually I mentioned that way in [1] very early), so I will be happy if you can leverage it, what about make this change base on it?\n\n[1] https://review.openstack.org/#/c/52029/1/glance/common/wsgi.py","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a67fbbc0d64364a732ed76ba9374f93e6ff0fb4a","unresolved":false,"context_lines":[{"line_number":647,"context_line":"            action_result \u003d self.dispatch(self.controller, action,"},{"line_number":648,"context_line":"                                          request, **action_args)"},{"line_number":649,"context_line":"        except webob.exc.WSGIHTTPException as e:"},{"line_number":650,"context_line":"            raise translate_exception(request, e)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        try:"},{"line_number":653,"context_line":"            response \u003d webob.Response(request\u003drequest)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9GU%3D","line":650,"in_reply_to":"AAAAUX%2F%2F9VE%3D","updated":"2014-02-08 15:17:44.000000000","message":"ok, let talk about it at there, to make an agreement.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":647,"context_line":"            action_result \u003d self.dispatch(self.controller, action,"},{"line_number":648,"context_line":"                                          request, **action_args)"},{"line_number":649,"context_line":"        except webob.exc.WSGIHTTPException as e:"},{"line_number":650,"context_line":"            raise translate_exception(request, e)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        try:"},{"line_number":653,"context_line":"            response \u003d webob.Response(request\u003drequest)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9VE%3D","line":650,"in_reply_to":"AAAAUX%2F%2F9qI%3D","updated":"2014-02-08 14:30:38.000000000","message":"TBH, I had mentioned the problem that the patch https://review.openstack.org/#/c/71707/1/glance/common/wsgi.py is trying fix, with markwash. But he think it will introduce some backward compatibility issue. So I prefer to land this separately and we can discuss that one in the weekly meeting.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            return response"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":658,"context_line":"            if isinstance(e, webob.exc.WSGIHTTPException):"},{"line_number":659,"context_line":"                return translate_exception(request, e)"},{"line_number":660,"context_line":"            return e"},{"line_number":661,"context_line":"        # return unserializable result (typically a webob exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9qE%3D","line":658,"updated":"2014-02-08 09:34:46.000000000","message":"IMO giving webob.exc.WSGIHTTPException a dedicated catch branch will be nice.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1b85c031b3d59af8b504c18c4fa090033308101f","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            return response"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":658,"context_line":"            if isinstance(e, webob.exc.WSGIHTTPException):"},{"line_number":659,"context_line":"                return translate_exception(request, e)"},{"line_number":660,"context_line":"            return e"},{"line_number":661,"context_line":"        # return unserializable result (typically a webob exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F5xk%3D","line":658,"in_reply_to":"AAAAUX%2F%2F7IA%3D","updated":"2014-02-10 03:11:25.000000000","message":"IIRC, SEH is a typical term for Win32. But anyway, I think your suggestion makes more sense. Thanks.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d1369f3ff6f8b83064ffee7a1ff2c7ea9aec2e6b","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            return response"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":658,"context_line":"            if isinstance(e, webob.exc.WSGIHTTPException):"},{"line_number":659,"context_line":"                return translate_exception(request, e)"},{"line_number":660,"context_line":"            return e"},{"line_number":661,"context_line":"        # return unserializable result (typically a webob exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F7IA%3D","line":658,"in_reply_to":"AAAAUX%2F%2F8SY%3D","updated":"2014-02-09 17:16:49.000000000","message":"Actually we should never do this way for exception handling, in modern/OOP programming language, the correct approach for this is to use structured exception handling (SEH), always.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"81d35903b6773bed3976603e650a45e6891f7160","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            return response"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":658,"context_line":"            if isinstance(e, webob.exc.WSGIHTTPException):"},{"line_number":659,"context_line":"                return translate_exception(request, e)"},{"line_number":660,"context_line":"            return e"},{"line_number":661,"context_line":"        # return unserializable result (typically a webob exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F8SY%3D","line":658,"in_reply_to":"AAAAUX%2F%2F9HQ%3D","updated":"2014-02-09 12:31:09.000000000","message":"Definitely, I just don\u0027t like that way, TBH. But I\u0027m OK to change it.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a67fbbc0d64364a732ed76ba9374f93e6ff0fb4a","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            return response"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":658,"context_line":"            if isinstance(e, webob.exc.WSGIHTTPException):"},{"line_number":659,"context_line":"                return translate_exception(request, e)"},{"line_number":660,"context_line":"            return e"},{"line_number":661,"context_line":"        # return unserializable result (typically a webob exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9HQ%3D","line":658,"in_reply_to":"AAAAUX%2F%2F9Wk%3D","updated":"2014-02-08 15:17:44.000000000","message":"IMO:\n\n    try:\n        ...\n    except webob.exc.WSGIHTTPException as e:\n        return translate_exception(request, e)\n    except webob.exc.HTTPException as e:\n        return e\n    ...\n\nDid you noticed webob.exc.HTTPException is a sub class of Exception also which at line #662? Do you really think it\u0027s a sensible way to do an isinstance(..) check in that block for webob.exc.HTTPException stuff?","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            return response"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        except webob.exc.HTTPException as e:"},{"line_number":658,"context_line":"            if isinstance(e, webob.exc.WSGIHTTPException):"},{"line_number":659,"context_line":"                return translate_exception(request, e)"},{"line_number":660,"context_line":"            return e"},{"line_number":661,"context_line":"        # return unserializable result (typically a webob exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Wk%3D","line":658,"in_reply_to":"AAAAUX%2F%2F9qE%3D","updated":"2014-02-08 14:30:38.000000000","message":"webob.exc.WSGIHTTPException is the sub class of webob.exc.HTTPException, so it will be strange if we put this as a separate branch.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8d7dc5e4577bc07a2c33d8153118e8209d37c409","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    locale \u003d req.best_match_language()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    if isinstance(e, webob.exc.HTTPError):"},{"line_number":590,"context_line":"        # NOTE(flwang): If the explanation is not a Message, that means the"},{"line_number":591,"context_line":"        # explanation is the default, generic and not translatable explanation"},{"line_number":592,"context_line":"        # from webop.exc. Since the explanation is the error shown when the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FvxM%3D","line":589,"updated":"2014-02-11 07:00:04.000000000","message":"Did you improved this function a little bit? seems it\u0027s same as before version, am I miss anything?","commit_id":"ca5edcd05c0bcbee336060389be57819c816e54f"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"fca1c094288eef6f1bd23e7f35ba3ead93946a7a","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    locale \u003d req.best_match_language()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    if isinstance(e, webob.exc.HTTPError):"},{"line_number":590,"context_line":"        # NOTE(flwang): If the explanation is not a Message, that means the"},{"line_number":591,"context_line":"        # explanation is the default, generic and not translatable explanation"},{"line_number":592,"context_line":"        # from webop.exc. Since the explanation is the error shown when the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FtAc%3D","line":589,"in_reply_to":"AAAAUX%2F%2FtEc%3D","updated":"2014-02-11 11:06:40.000000000","message":"Looks like there\u0027s nothing we can do here since we\u0027re using `webob` exceptions directly.\n\nhttps://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L63","commit_id":"ca5edcd05c0bcbee336060389be57819c816e54f"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4ed5bd51e962417f23aed57a4fe20daef232dcfc","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    locale \u003d req.best_match_language()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    if isinstance(e, webob.exc.HTTPError):"},{"line_number":590,"context_line":"        # NOTE(flwang): If the explanation is not a Message, that means the"},{"line_number":591,"context_line":"        # explanation is the default, generic and not translatable explanation"},{"line_number":592,"context_line":"        # from webop.exc. Since the explanation is the error shown when the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FtEc%3D","line":589,"in_reply_to":"AAAAUX%2F%2FvxM%3D","updated":"2014-02-11 10:58:06.000000000","message":"I\u0027d prefer not catching `webob.exc.HTTPError`. We\u0027ve a base class for our exceptions, we should be using that.","commit_id":"ca5edcd05c0bcbee336060389be57819c816e54f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"068e5035bd13a9ecde3422b701ee098762ff864a","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    locale \u003d req.best_match_language()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    if isinstance(e, webob.exc.HTTPError):"},{"line_number":590,"context_line":"        # NOTE(flwang): If the explanation is not a Message, that means the"},{"line_number":591,"context_line":"        # explanation is the default, generic and not translatable explanation"},{"line_number":592,"context_line":"        # from webop.exc. Since the explanation is the error shown when the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FtX0%3D","line":589,"in_reply_to":"AAAAUX%2F%2FvxM%3D","updated":"2014-02-11 10:14:23.000000000","message":"It is for compatibility purposes when lazy\u003dFalse, and to do what I have mentioned in above comment, and to deal with exceptions from webob.exc that are thrown by webob not by the glance code.","commit_id":"ca5edcd05c0bcbee336060389be57819c816e54f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"29a86f9dd96c70b55bd9151734c1a4ce088f7ba5","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        # exception is converted to a response, let\u0027s actually swap it with"},{"line_number":594,"context_line":"        # message, since message is what gets passed in at construction time"},{"line_number":595,"context_line":"        # in the API."},{"line_number":596,"context_line":"        if not isinstance(e.explanation, gettextutils.Message):"},{"line_number":597,"context_line":"            e.explanation \u003d str(e)"},{"line_number":598,"context_line":"            e.detail \u003d \u0027\u0027"},{"line_number":599,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FtCQ%3D","line":596,"updated":"2014-02-11 11:02:09.000000000","message":"As I mentioned in IRC, I still think this check is overkill tbh, since anyway gettextutils.translate() can take care these two branches:\n\nhttp://paste.openstack.org/show/64200/","commit_id":"ca5edcd05c0bcbee336060389be57819c816e54f"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"bc8f4a77021266bc2a730b6b4b328d545762bc8c","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    locale \u003d req.best_match_language()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    if isinstance(e, webob.exc.HTTPError):"},{"line_number":590,"context_line":"        e.explanation \u003d gettextutils.translate(e.explanation, locale)"},{"line_number":591,"context_line":"        e.detail \u003d gettextutils.translate(e.detail, locale)"},{"line_number":592,"context_line":"    return e"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2FnXk%3D","line":589,"updated":"2014-02-12 00:15:09.000000000","message":"Is it possible that the excption is not an HTTPError for example a GlanceException instead?","commit_id":"25fbe0dcaeb0a5c61008c254d70dd662368960be"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ea63bb7c087d312f76eb1dd6a5457e21b7e704d9","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    locale \u003d req.best_match_language()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    if isinstance(e, webob.exc.HTTPError):"},{"line_number":590,"context_line":"        e.explanation \u003d gettextutils.translate(e.explanation, locale)"},{"line_number":591,"context_line":"        e.detail \u003d gettextutils.translate(e.detail, locale)"},{"line_number":592,"context_line":"    return e"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2Fl7Y%3D","line":589,"in_reply_to":"AAAAUX%2F%2FnXk%3D","updated":"2014-02-12 06:01:14.000000000","message":"I would say nope, since this method is only invoked by line 639 and 646.","commit_id":"25fbe0dcaeb0a5c61008c254d70dd662368960be"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"755b7779e464dd76e54fc8d4b114e402e88ae048","unresolved":false,"context_lines":[{"line_number":633,"context_line":"                                             action, request)"},{"line_number":634,"context_line":"        action_args.update(deserialized_request)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        try:"},{"line_number":637,"context_line":"            action_result \u003d self.dispatch(self.controller, action,"},{"line_number":638,"context_line":"                                          request, **action_args)"},{"line_number":639,"context_line":"        except webob.exc.WSGIHTTPException as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2F0dg%3D","line":636,"updated":"2014-02-28 03:19:10.000000000","message":"According to your change, seems we need put above two lines which for request deserialization into this try-catch block also? For example:\n\n    https://review.openstack.org/#/c/71398/15/glance/api/v2/tasks.py\n    https://review.openstack.org/#/c/71398/15/glance/api/v2/images.py\n    https://review.openstack.org/#/c/71398/15/glance/api/v2/image_data.py","commit_id":"259307c0a6ff310db8a99ead5aa4970a0bb181f1"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0dac0c4a2f98b95b12cd30d9d59d267b90fcd42f","unresolved":false,"context_lines":[{"line_number":633,"context_line":"                                             action, request)"},{"line_number":634,"context_line":"        action_args.update(deserialized_request)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        try:"},{"line_number":637,"context_line":"            action_result \u003d self.dispatch(self.controller, action,"},{"line_number":638,"context_line":"                                          request, **action_args)"},{"line_number":639,"context_line":"        except webob.exc.WSGIHTTPException as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FxKY%3D","line":636,"in_reply_to":"AAAAVX%2F%2F0dg%3D","updated":"2014-02-28 12:18:21.000000000","message":"Good catch.","commit_id":"259307c0a6ff310db8a99ead5aa4970a0bb181f1"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b4284142ef44e73a03364c4bcdb9050e5259bd80","unresolved":false,"context_lines":[{"line_number":636,"context_line":"            action_result \u003d self.dispatch(self.controller, action,"},{"line_number":637,"context_line":"                                          request, **action_args)"},{"line_number":638,"context_line":"        except webob.exc.WSGIHTTPException as e:"},{"line_number":639,"context_line":"            raise translate_exception(request, e)"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"        try:"},{"line_number":642,"context_line":"            response \u003d webob.Response(request\u003drequest)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVX%2F%2FvPQ%3D","line":639,"updated":"2014-02-28 16:59:31.000000000","message":"It would be best if this raise included the original stack trace context, so that we don\u0027t lose the history of where the exception was originally raised.","commit_id":"8f7987925c541c15976d12384913baee15894a74"}],"glance/image_cache/drivers/xattr.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \"%s\" % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9pw%3D","line":284,"updated":"2014-02-08 09:34:46.000000000","message":"set_attr(\u0027error\u0027, unicode(e))","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"78b4e3f0cd8d8b0f124ef6b953f0499d2ff5a4d0","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \"%s\" % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F5H8%3D","line":284,"in_reply_to":"AAAAUX%2F%2F5xI%3D","updated":"2014-02-10 05:33:01.000000000","message":"Replied in https://review.openstack.org/#/c/71398/2/glance/cmd/__init__.py","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1b85c031b3d59af8b504c18c4fa090033308101f","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \"%s\" % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F5xI%3D","line":284,"in_reply_to":"AAAAUX%2F%2F7H4%3D","updated":"2014-02-10 03:11:25.000000000","message":"FYI.\n\n2014-02-08 23:39:50.254 17271 TRACE glance.image_cache     set_xattr(incomplete_path, key, value)\n2014-02-08 23:39:50.254 17271 TRACE glance.image_cache   File \"/home/flwang/MyWorkSpace/workspace_community/glance/glance/image_cache/drivers/xattr.py\", line 486, in set_xattr\n2014-02-08 23:39:50.254 17271 TRACE glance.image_cache     xattr.setxattr(path, namespaced_key, str(value))\n2014-02-08 23:39:50.254 17271 TRACE glance.image_cache   File \"/home/flwang/MyWorkSpace/workspace_community/glance/glance/openstack/common/gettextutils.py\", line 275, in __str__\n2014-02-08 23:39:50.254 17271 TRACE glance.image_cache     raise UnicodeError(msg)\n2014-02-08 23:39:50.254 17271 TRACE glance.image_cache UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d1369f3ff6f8b83064ffee7a1ff2c7ea9aec2e6b","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \"%s\" % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F7H4%3D","line":284,"in_reply_to":"AAAAUX%2F%2F7jU%3D","updated":"2014-02-09 17:16:49.000000000","message":"Hmm..can we get the root cause for the test case failure first? It doesn\u0027t make sense to me. Will look this closer on my morning.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"81d35903b6773bed3976603e650a45e6891f7160","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \"%s\" % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F7jU%3D","line":284,"in_reply_to":"AAAAUX%2F%2F9G8%3D","updated":"2014-02-09 12:31:09.000000000","message":"I would say we need to keep the original way, otherwise it will break test case glance.tests.unit.test_image_cache.TestImageCacheXattr.test_gate_caching_iter_bad_checksum, based on my test. Thanks.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a67fbbc0d64364a732ed76ba9374f93e6ff0fb4a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \"%s\" % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9G8%3D","line":284,"in_reply_to":"AAAAUX%2F%2F9W4%3D","updated":"2014-02-08 15:17:44.000000000","message":"I believe they are equivalency:\n\n    \u003e\u003e\u003e \"%s\" % unicode(Exception(\"abc\"))\n    u\u0027abc\u0027\n    \u003e\u003e\u003e unicode(Exception(\"abc\"))\n    u\u0027abc\u0027","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \"%s\" % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9W4%3D","line":284,"in_reply_to":"AAAAUX%2F%2F9pw%3D","updated":"2014-02-08 14:30:38.000000000","message":"Because I don\u0027t know if there is any consideration for current implement, so I keep it. But I\u0027m OK to follow the way you mentioned.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""},{"line_number":288,"context_line":"                        \"moving \u0027%(incomplete_path)s\u0027 to \""},{"line_number":289,"context_line":"                        \"\u0027%(invalid_path)s\u0027\"),"},{"line_number":290,"context_line":"                      {\u0027e\u0027: e, \u0027incomplete_path\u0027: incomplete_path,"},{"line_number":291,"context_line":"                       \u0027invalid_path\u0027: invalid_path})"},{"line_number":292,"context_line":"            os.rename(incomplete_path, invalid_path)"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9ps%3D","line":290,"updated":"2014-02-08 09:34:46.000000000","message":"\u0027e\u0027: unicode(e) ...","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""},{"line_number":288,"context_line":"                        \"moving \u0027%(incomplete_path)s\u0027 to \""},{"line_number":289,"context_line":"                        \"\u0027%(invalid_path)s\u0027\"),"},{"line_number":290,"context_line":"                      {\u0027e\u0027: e, \u0027incomplete_path\u0027: incomplete_path,"},{"line_number":291,"context_line":"                       \u0027invalid_path\u0027: invalid_path})"},{"line_number":292,"context_line":"            os.rename(incomplete_path, invalid_path)"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Ww%3D","line":290,"in_reply_to":"AAAAUX%2F%2F9ps%3D","updated":"2014-02-08 14:30:38.000000000","message":"Will fix in next PS","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8d7dc5e4577bc07a2c33d8153118e8209d37c409","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \u0027%s\u0027 % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FvwU%3D","line":284,"updated":"2014-02-11 07:00:04.000000000","message":"pls take a look on my latest comments within https://review.openstack.org/#/c/71398/2/glance/cmd/__init__.py","commit_id":"ca5edcd05c0bcbee336060389be57819c816e54f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"068e5035bd13a9ecde3422b701ee098762ff864a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                os.unlink(self.get_image_filepath(image_id, \u0027queue\u0027))"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        def rollback(e):"},{"line_number":284,"context_line":"            set_attr(\u0027error\u0027, \u0027%s\u0027 % unicode(e))"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"},{"line_number":287,"context_line":"            LOG.debug(_(\"Fetch of cache file failed (%(e)s), rolling back by \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FtXs%3D","line":284,"in_reply_to":"AAAAUX%2F%2FvwU%3D","updated":"2014-02-11 10:14:23.000000000","message":"Will fix in next PS.","commit_id":"ca5edcd05c0bcbee336060389be57819c816e54f"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"340d4b923bb907f1419a89dd943986595298e366","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        def rollback(e):"},{"line_number":285,"context_line":"            # NOTE(flwang): The inner six.text_type() will get a Message"},{"line_number":286,"context_line":"            # object from e, the outer six.text_type() will convert the"},{"line_number":287,"context_line":"            # Message object to an unicode string if it\u0027s necessary."},{"line_number":288,"context_line":"            set_attr(\u0027error\u0027, six.text_type(six.text_type(e)))"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            invalid_path \u003d self.get_image_filepath(image_id, \u0027invalid\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FZV0%3D","line":287,"updated":"2014-02-26 21:25:19.000000000","message":"Its really awkward that\n\n  six.text_type(foo) !\u003d six.text_type(six.text_type(foo))\n\nCan you be a bit more explicit in terms of code about what is going on in the case where the second conversion would be needed, just to avoid that extra conversion? The comment gives a good hint but I\u0027d really like to see the underlying mechanism here in code.","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"}],"glance/notifier.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if CONF.notifier_strategy !\u003d \u0027default\u0027:"},{"line_number":65,"context_line":"            msg \u003d _(\"notifier_strategy was deprecated in \""},{"line_number":66,"context_line":"                    \"favor of `notification_driver`\")"},{"line_number":67,"context_line":"            LOG.warn(msg)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # NOTE(flaper87): Use this to keep backwards"},{"line_number":70,"context_line":"        # compatibility. We\u0027ll try to get an oslo.messaging"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9po%3D","line":67,"updated":"2014-02-08 09:34:46.000000000","message":"seems this is not a related change for this patch/fix.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a67fbbc0d64364a732ed76ba9374f93e6ff0fb4a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if CONF.notifier_strategy !\u003d \u0027default\u0027:"},{"line_number":65,"context_line":"            msg \u003d _(\"notifier_strategy was deprecated in \""},{"line_number":66,"context_line":"                    \"favor of `notification_driver`\")"},{"line_number":67,"context_line":"            LOG.warn(msg)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # NOTE(flaper87): Use this to keep backwards"},{"line_number":70,"context_line":"        # compatibility. We\u0027ll try to get an oslo.messaging"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Go%3D","line":67,"in_reply_to":"AAAAUX%2F%2F9XA%3D","updated":"2014-02-08 15:17:44.000000000","message":"ok","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if CONF.notifier_strategy !\u003d \u0027default\u0027:"},{"line_number":65,"context_line":"            msg \u003d _(\"notifier_strategy was deprecated in \""},{"line_number":66,"context_line":"                    \"favor of `notification_driver`\")"},{"line_number":67,"context_line":"            LOG.warn(msg)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # NOTE(flaper87): Use this to keep backwards"},{"line_number":70,"context_line":"        # compatibility. We\u0027ll try to get an oslo.messaging"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9XA%3D","line":67,"in_reply_to":"AAAAUX%2F%2F9po%3D","updated":"2014-02-08 14:30:38.000000000","message":"warnings.warn will cause below test case failed. After confirmed with flaper87,  this is a safe change.\n\nhttps://github.com/openstack/glance/blob/master/glance/tests/unit/test_notifier.py#L104","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"340d4b923bb907f1419a89dd943986595298e366","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if CONF.notifier_strategy !\u003d \u0027default\u0027:"},{"line_number":68,"context_line":"            msg \u003d _(\"notifier_strategy was deprecated in \""},{"line_number":69,"context_line":"                    \"favor of `notification_driver`\")"},{"line_number":70,"context_line":"            LOG.warn(msg)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            # NOTE(flaper87): Use this to keep backwards"},{"line_number":73,"context_line":"            # compatibility. We\u0027ll try to get an oslo.messaging"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FZUw%3D","line":70,"updated":"2014-02-26 21:25:19.000000000","message":"Why is this change needed?","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"afd5219f7bc6d5c53f50faeb52663f6f4b82df77","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if CONF.notifier_strategy !\u003d \u0027default\u0027:"},{"line_number":68,"context_line":"            msg \u003d _(\"notifier_strategy was deprecated in \""},{"line_number":69,"context_line":"                    \"favor of `notification_driver`\")"},{"line_number":70,"context_line":"            LOG.warn(msg)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            # NOTE(flaper87): Use this to keep backwards"},{"line_number":73,"context_line":"            # compatibility. We\u0027ll try to get an oslo.messaging"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F9GE%3D","line":70,"in_reply_to":"AAAAU3%2F%2FZUw%3D","updated":"2014-02-27 09:04:21.000000000","message":"Otherwise, we will run into below test failure. The root cause is warnings.warn is trying to call str(Message). However, it\u0027s denied by Message object. And I have confirmed with flaper87, this change is safe.\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nFAIL: glance.tests.unit.test_notifier.TestNotifier.test_custom_strategy\n----------------------------------------------------------------------\nTraceback (most recent call last):\n_StringException: Traceback (most recent call last):\n  File \"glance/tests/unit/test_notifier.py\", line 109, in test_custom_strategy\n    notifier.Notifier()\n  File \"glance/notifier.py\", line 71, in __init__\n    warnings.warn(msg, DeprecationWarning)\n  File \"/home/flwang/MyWorkSpace/workspace_community/glance/.venv/lib/python2.7/warnings.py\", line 29, in _show_warning\n    file.write(formatwarning(message, category, filename, lineno, line))\n  File \"/home/flwang/MyWorkSpace/workspace_community/glance/.venv/lib/python2.7/warnings.py\", line 38, in formatwarning\n    s \u003d  \"%s:%s: %s: %s\\n\" % (filename, lineno, category.__name__, message)\n  File \"glance/openstack/common/gettextutils.py\", line 275, in __str__\n    raise UnicodeError(msg)\nUnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"}],"glance/store/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1f501e3c23d74636bf248d7568064f7a2c7c71f9","unresolved":false,"context_lines":[{"line_number":718,"context_line":"                                          \u0027err\u0027: e})"},{"line_number":719,"context_line":"                err \u003d e"},{"line_number":720,"context_line":"        # tried all locations"},{"line_number":721,"context_line":"        LOG.error(_(\u0027Glance tried all locations to get data for image %s \u0027"},{"line_number":722,"context_line":"                    \u0027but all have failed.\u0027) % self.image.image_id)"},{"line_number":723,"context_line":"        raise err"},{"line_number":724,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9o8%3D","line":721,"updated":"2014-02-08 09:34:46.000000000","message":"unicode(e)","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b8072cb5fe286f2f0a03f4bca620ad7226f4be5","unresolved":false,"context_lines":[{"line_number":718,"context_line":"                                          \u0027err\u0027: e})"},{"line_number":719,"context_line":"                err \u003d e"},{"line_number":720,"context_line":"        # tried all locations"},{"line_number":721,"context_line":"        LOG.error(_(\u0027Glance tried all locations to get data for image %s \u0027"},{"line_number":722,"context_line":"                    \u0027but all have failed.\u0027) % self.image.image_id)"},{"line_number":723,"context_line":"        raise err"},{"line_number":724,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2F9Xw%3D","line":721,"in_reply_to":"AAAAUX%2F%2F9o8%3D","updated":"2014-02-08 14:30:38.000000000","message":"Good catch.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"}],"glance/store/vmware/api.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"755b7779e464dd76e54fc8d4b114e402e88ae048","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from eventlet import event"},{"line_number":22,"context_line":"import six"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import glance.openstack.common.log as logging"},{"line_number":25,"context_line":"from glance.openstack.common import loopingcall"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2F0aM%3D","line":22,"updated":"2014-02-28 03:19:10.000000000","message":"Probably we could land https://review.openstack.org/#/c/76991/ change first, then to prevent useless changes (yours and incoming changs) at glance/store/vmware/* , deal?","commit_id":"259307c0a6ff310db8a99ead5aa4970a0bb181f1"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0dac0c4a2f98b95b12cd30d9d59d267b90fcd42f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from eventlet import event"},{"line_number":22,"context_line":"import six"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import glance.openstack.common.log as logging"},{"line_number":25,"context_line":"from glance.openstack.common import loopingcall"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FxKg%3D","line":22,"in_reply_to":"AAAAVX%2F%2F0aM%3D","updated":"2014-02-28 12:18:21.000000000","message":"Sure, make sense for me.","commit_id":"259307c0a6ff310db8a99ead5aa4970a0bb181f1"}],"glance/store/vmware/vim.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"340d4b923bb907f1419a89dd943986595298e366","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                fault_list \u003d []"},{"line_number":190,"context_line":"                for child in detail.getChildren():"},{"line_number":191,"context_line":"                    fault_list.append(child.get(\u0027type\u0027))"},{"line_number":192,"context_line":"                raise error_util.VimFaultException(fault_list,"},{"line_number":193,"context_line":"                                                   six.text_type(excep))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"            except AttributeError as excep:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FZTk%3D","line":192,"updated":"2014-02-26 21:25:19.000000000","message":"This indentation looks a bit odd. How about moving the first and second argument together on the line after raise?\n\nreally minor nit","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"afd5219f7bc6d5c53f50faeb52663f6f4b82df77","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                fault_list \u003d []"},{"line_number":190,"context_line":"                for child in detail.getChildren():"},{"line_number":191,"context_line":"                    fault_list.append(child.get(\u0027type\u0027))"},{"line_number":192,"context_line":"                raise error_util.VimFaultException(fault_list,"},{"line_number":193,"context_line":"                                                   six.text_type(excep))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"            except AttributeError as excep:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F9bM%3D","line":192,"in_reply_to":"AAAAU3%2F%2FZTk%3D","updated":"2014-02-27 09:04:21.000000000","message":"It will exceed 80 chars if place them in same line.","commit_id":"b94a37b3c785592b9601af5155bbb1c4c01bf52d"}],"glance/tests/unit/common/test_wsgi.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"5787c1a6557a4bf1ddeb41198a8fbd6babb93963","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123\u0027)"},{"line_number":83,"context_line":"        request.headers[\"Accept-Language\"] \u003d \"zz-ZZ,zz;q\u003d0.8\""},{"line_number":84,"context_line":"        result \u003d request.best_match_language()"},{"line_number":85,"context_line":"        self.assertEqual(result, None)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_language_accept_none(self):"},{"line_number":88,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fu2s%3D","line":85,"updated":"2014-02-11 07:00:27.000000000","message":"nit: prefer using assertIsNone() directly.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1d3be7d5bb69864d980224f947f58e695e3f27d2","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123\u0027)"},{"line_number":83,"context_line":"        request.headers[\"Accept-Language\"] \u003d \"zz-ZZ,zz;q\u003d0.8\""},{"line_number":84,"context_line":"        result \u003d request.best_match_language()"},{"line_number":85,"context_line":"        self.assertEqual(result, None)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_language_accept_none(self):"},{"line_number":88,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtXI%3D","line":85,"in_reply_to":"AAAAUX%2F%2Fu2s%3D","updated":"2014-02-11 10:14:14.000000000","message":"Will fix it in next PS.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"5787c1a6557a4bf1ddeb41198a8fbd6babb93963","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    def test_language_accept_none(self):"},{"line_number":88,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123\u0027)"},{"line_number":89,"context_line":"        result \u003d request.best_match_language()"},{"line_number":90,"context_line":"        self.assertEqual(result, None)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test_best_match_language(self):"},{"line_number":93,"context_line":"        # Test that we are actually invoking language negotiation by webop"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fu2o%3D","line":90,"updated":"2014-02-11 07:00:27.000000000","message":"ditto","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1d3be7d5bb69864d980224f947f58e695e3f27d2","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    def test_language_accept_none(self):"},{"line_number":88,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123\u0027)"},{"line_number":89,"context_line":"        result \u003d request.best_match_language()"},{"line_number":90,"context_line":"        self.assertEqual(result, None)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test_best_match_language(self):"},{"line_number":93,"context_line":"        # Test that we are actually invoking language negotiation by webop"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtXE%3D","line":90,"in_reply_to":"AAAAUX%2F%2Fu2o%3D","updated":"2014-02-11 10:14:14.000000000","message":"Done","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"5787c1a6557a4bf1ddeb41198a8fbd6babb93963","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        request.headers \u003d {\u0027Accept-Language\u0027: \u0027\u0027}"},{"line_number":109,"context_line":"        self.assertIsNone(request.best_match_language())"},{"line_number":110,"context_line":"        request.headers.pop(\u0027Accept-Language\u0027)"},{"line_number":111,"context_line":"        self.assertIsNone(request.best_match_language())"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class ResourceTest(test_utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fu2g%3D","line":111,"updated":"2014-02-11 07:00:27.000000000","message":"IMO it will be better if we can give a match-able accept-language test case.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1d3be7d5bb69864d980224f947f58e695e3f27d2","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        request.headers \u003d {\u0027Accept-Language\u0027: \u0027\u0027}"},{"line_number":109,"context_line":"        self.assertIsNone(request.best_match_language())"},{"line_number":110,"context_line":"        request.headers.pop(\u0027Accept-Language\u0027)"},{"line_number":111,"context_line":"        self.assertIsNone(request.best_match_language())"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class ResourceTest(test_utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtXA%3D","line":111,"in_reply_to":"AAAAUX%2F%2Fu2g%3D","updated":"2014-02-11 10:14:14.000000000","message":"Will fix it in next PS.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"5787c1a6557a4bf1ddeb41198a8fbd6babb93963","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                                 None)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        def fake_translate_exception(ex, locale):"},{"line_number":222,"context_line":"            return webob.exc.HTTPBadRequest(message_es)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self.stubs.SmartSet(wsgi,"},{"line_number":225,"context_line":"                            \u0027translate_exception\u0027, fake_translate_exception)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fuq8%3D","line":222,"updated":"2014-02-11 07:00:27.000000000","message":"so I think it will be move complete if we give a dedicated test case for translate_exception().","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"441f4c4ced4ce6f19c853a568eccc3e5d72daa9b","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                                 None)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        def fake_translate_exception(ex, locale):"},{"line_number":222,"context_line":"            return webob.exc.HTTPBadRequest(message_es)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self.stubs.SmartSet(wsgi,"},{"line_number":225,"context_line":"                            \u0027translate_exception\u0027, fake_translate_exception)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtWE%3D","line":222,"in_reply_to":"AAAAUX%2F%2FtW0%3D","updated":"2014-02-11 10:18:00.000000000","message":"Yes, s/move/more","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1d3be7d5bb69864d980224f947f58e695e3f27d2","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                                 None)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        def fake_translate_exception(ex, locale):"},{"line_number":222,"context_line":"            return webob.exc.HTTPBadRequest(message_es)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self.stubs.SmartSet(wsgi,"},{"line_number":225,"context_line":"                            \u0027translate_exception\u0027, fake_translate_exception)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtW0%3D","line":222,"in_reply_to":"AAAAUX%2F%2Fuq8%3D","updated":"2014-02-11 10:14:14.000000000","message":"Did you mean \u0027more complete\u0027? I will try to add one in next PS.","commit_id":"3f891519cea985ca897e1dd058d69f82d94517a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c58dda116acf36ec757194ab358eca7619c34ced","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        def returns_some_locales(*args, **kwargs):"},{"line_number":39,"context_line":"            return all_locales"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.stubs.Set(localedata, \u0027locale_identifiers\u0027, returns_some_locales)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        # Override gettext.find to return other than None for some languages."},{"line_number":44,"context_line":"        def fake_gettext_find(lang_id, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FSPc%3D","line":41,"updated":"2014-02-14 08:51:30.000000000","message":"nit: mock it will be better, but it\u0027s not a blocker to me.","commit_id":"6cb2dde60882068e4b549ebf93c5ed4876c412d6"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"da7b4014d78894d558f51bad0205934ba60272b2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        def returns_some_locales(*args, **kwargs):"},{"line_number":39,"context_line":"            return all_locales"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.stubs.Set(localedata, \u0027locale_identifiers\u0027, returns_some_locales)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        # Override gettext.find to return other than None for some languages."},{"line_number":44,"context_line":"        def fake_gettext_find(lang_id, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FEDY%3D","line":41,"in_reply_to":"AAAAUX%2F%2FSPc%3D","updated":"2014-02-17 11:08:21.000000000","message":"I have tried to use mock, but it\u0027s a little bit difficult since this method is invoked by more than one test cases.","commit_id":"6cb2dde60882068e4b549ebf93c5ed4876c412d6"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c58dda116acf36ec757194ab358eca7619c34ced","unresolved":false,"context_lines":[{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def test_translate_exception(self):"},{"line_number":271,"context_line":"        def fake_translate(obj, desired_locale):"},{"line_number":272,"context_line":"            if desired_locale \u003d\u003d \u0027de\u0027:"},{"line_number":273,"context_line":"                return \u0027No Encontrado\u0027"},{"line_number":274,"context_line":"            return obj"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FSC8%3D","line":272,"updated":"2014-02-14 08:51:30.000000000","message":"Base on the logic at line #277, this check is useless.\n\nDid you planed to make another request with different Accept-Languag? If didn\u0027t, removing this check will be cool IMO.","commit_id":"6cb2dde60882068e4b549ebf93c5ed4876c412d6"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"da7b4014d78894d558f51bad0205934ba60272b2","unresolved":false,"context_lines":[{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def test_translate_exception(self):"},{"line_number":271,"context_line":"        def fake_translate(obj, desired_locale):"},{"line_number":272,"context_line":"            if desired_locale \u003d\u003d \u0027de\u0027:"},{"line_number":273,"context_line":"                return \u0027No Encontrado\u0027"},{"line_number":274,"context_line":"            return obj"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FEC8%3D","line":272,"in_reply_to":"AAAAUX%2F%2FSC8%3D","updated":"2014-02-17 11:08:21.000000000","message":"Done","commit_id":"6cb2dde60882068e4b549ebf93c5ed4876c412d6"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e1aa6d0863312849f3783fb1253b26a5fec62d9c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        request.headers[\"Accept\"] \u003d (\"application/json; q\u003d0.3, \""},{"line_number":94,"context_line":"                                     \"application/xml; q\u003d0.9\")"},{"line_number":95,"context_line":"        result \u003d request.best_match_content_type()"},{"line_number":96,"context_line":"        self.assertEqual(result, \"application/json\")"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_content_type_accept_default(self):"},{"line_number":99,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123.unsupported\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2FimY%3D","line":96,"updated":"2014-02-26 02:11:04.000000000","message":"I prefer to change argument order to: expected, observed\n\n(bug/1277104: https://bugs.launchpad.net/ceilometer/+bug/1277104 )","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"be943f5882deb95f7c83d1dec65707bd770922bb","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        request.headers[\"Accept\"] \u003d (\"application/json; q\u003d0.3, \""},{"line_number":94,"context_line":"                                     \"application/xml; q\u003d0.9\")"},{"line_number":95,"context_line":"        result \u003d request.best_match_content_type()"},{"line_number":96,"context_line":"        self.assertEqual(result, \"application/json\")"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_content_type_accept_default(self):"},{"line_number":99,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123.unsupported\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fh30%3D","line":96,"in_reply_to":"AAAAU3%2F%2FimY%3D","updated":"2014-02-26 04:18:17.000000000","message":"I would prefer to fix it in a separate patch. But I will fix the order issue in my code change.","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e1aa6d0863312849f3783fb1253b26a5fec62d9c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123.unsupported\u0027)"},{"line_number":100,"context_line":"        request.headers[\"Accept\"] \u003d \"application/unsupported1\""},{"line_number":101,"context_line":"        result \u003d request.best_match_content_type()"},{"line_number":102,"context_line":"        self.assertEqual(result, \"application/json\")"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def test_language_accept_default(self):"},{"line_number":105,"context_line":"        request \u003d wsgi.Request.blank(\u0027/tests/123\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fimw%3D","line":102,"updated":"2014-02-26 02:11:04.000000000","message":"ditto","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e1aa6d0863312849f3783fb1253b26a5fec62d9c","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        self._set_expected_languages(all_locales\u003d[\u0027it\u0027])"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        req \u003d wsgi.Request.blank(\u0027/\u0027, headers\u003d{\u0027Accept-Language\u0027: \u0027it\u0027})"},{"line_number":121,"context_line":"        self.assertEqual(req.best_match_language(), \u0027it\u0027)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_request_match_language_unexpected(self):"},{"line_number":124,"context_line":"        # If Accept-Language is a language we do not support,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fim0%3D","line":121,"updated":"2014-02-26 02:11:04.000000000","message":"ditto","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"be943f5882deb95f7c83d1dec65707bd770922bb","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        self._set_expected_languages(all_locales\u003d[\u0027it\u0027])"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        req \u003d wsgi.Request.blank(\u0027/\u0027, headers\u003d{\u0027Accept-Language\u0027: \u0027it\u0027})"},{"line_number":121,"context_line":"        self.assertEqual(req.best_match_language(), \u0027it\u0027)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_request_match_language_unexpected(self):"},{"line_number":124,"context_line":"        # If Accept-Language is a language we do not support,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fh3w%3D","line":121,"in_reply_to":"AAAAU3%2F%2Fim0%3D","updated":"2014-02-26 04:18:17.000000000","message":"Done","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e1aa6d0863312849f3783fb1253b26a5fec62d9c","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        response \u003d resource.__call__(request)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        self.assertIsInstance(response, webob.exc.HTTPForbidden)"},{"line_number":240,"context_line":"        self.assertEqual(response.status_code, 403)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    @mock.patch.object(wsgi, \u0027translate_exception\u0027)"},{"line_number":243,"context_line":"    def test_resource_call_error_handle_localized(self,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fim4%3D","line":240,"updated":"2014-02-26 02:11:04.000000000","message":"ditto","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e1aa6d0863312849f3783fb1253b26a5fec62d9c","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        e \u003d webob.exc.HTTPNotFound(explanation\u003d\u0027Not Found\u0027)"},{"line_number":275,"context_line":"        e \u003d wsgi.translate_exception(req, e)"},{"line_number":276,"context_line":"        self.assertEqual(e.explanation, \u0027No Encontrado\u0027)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"class JSONResponseSerializerTest(test_utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fim8%3D","line":276,"updated":"2014-02-26 02:11:04.000000000","message":"ditto","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"be943f5882deb95f7c83d1dec65707bd770922bb","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        e \u003d webob.exc.HTTPNotFound(explanation\u003d\u0027Not Found\u0027)"},{"line_number":275,"context_line":"        e \u003d wsgi.translate_exception(req, e)"},{"line_number":276,"context_line":"        self.assertEqual(e.explanation, \u0027No Encontrado\u0027)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"class JSONResponseSerializerTest(test_utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAU3%2F%2Fh3s%3D","line":276,"in_reply_to":"AAAAU3%2F%2Fim8%3D","updated":"2014-02-26 04:18:17.000000000","message":"Done","commit_id":"a6a42efbe98f669c511e2153d5ce57b7d71148e8"}]}
