)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1, use class variable message to replace"},{"line_number":17,"context_line":"using __doc__"},{"line_number":18,"context_line":"2, update new REST API return messages"},{"line_number":19,"context_line":"into keystone.pot"},{"line_number":20,"context_line":"3, modify wsgi.render_exception function to"},{"line_number":21,"context_line":"support unicode messages"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAPX%2F%2F654%3D","line":19,"updated":"2013-06-06 00:02:11.000000000","message":"I don\u0027t see a change to keystone.pot in this patch set. Was this missed or it\u0027s not intended to be in the change anymore?","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"43d7758e2228c6edd0cd86f704d3b066d0bb2da0","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1, use class variable message to replace"},{"line_number":17,"context_line":"using __doc__"},{"line_number":18,"context_line":"2, update new REST API return messages"},{"line_number":19,"context_line":"into keystone.pot"},{"line_number":20,"context_line":"3, modify wsgi.render_exception function to"},{"line_number":21,"context_line":"support unicode messages"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAPX%2F%2F6e4%3D","line":19,"in_reply_to":"AAAAPX%2F%2F654%3D","updated":"2013-06-06 03:36:12.000000000","message":"I\u0027m not sure whether the pot update should be done in my patch, or it will be update by special community member, that\u0027s why I didn\u0027t include updated pot in my patch","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3bca3f6646e4171a2fd27a6b0ccbdf780d3a4b30","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The doc string in exception.py of Keystone"},{"line_number":10,"context_line":"will be returned with __doc__ method, but"},{"line_number":11,"context_line":"cannot realize the internationalization."},{"line_number":12,"context_line":"Change exception module to enbale i18n"},{"line_number":13,"context_line":"support."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Changes are:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAPX%2F%2F5fA%3D","line":12,"updated":"2013-06-06 14:38:32.000000000","message":"spelling error? enbale -\u003e enable?","commit_id":"ff283fc14aaac881c51364bd9a624a540bb61788"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"0bd9704bd2debb9e077f6d68349cec5d24da9fb0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The doc string in exception.py of Keystone"},{"line_number":10,"context_line":"will be returned with __doc__ method, but"},{"line_number":11,"context_line":"cannot realize the internationalization."},{"line_number":12,"context_line":"Change exception module to enbale i18n"},{"line_number":13,"context_line":"support."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Changes are:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAPX%2F%2F3lY%3D","line":12,"in_reply_to":"AAAAPX%2F%2F5fA%3D","updated":"2013-06-07 02:59:25.000000000","message":"Thanks,I\u0027ll correct it","commit_id":"ff283fc14aaac881c51364bd9a624a540bb61788"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0acf06ffe6a1d5d667de2ad555c3c10c245c03ca","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1, use class variable message to replace"},{"line_number":17,"context_line":"using __doc__"},{"line_number":18,"context_line":"2, update new REST API return messages"},{"line_number":19,"context_line":"into keystone.pot"},{"line_number":20,"context_line":"3, modify wsgi.render_exception function to"},{"line_number":21,"context_line":"support unicode messages"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPX%2F%2F0FA%3D","line":19,"updated":"2013-06-09 15:36:10.000000000","message":"Since this patch isn\u0027t changing keystone.pot, the commit message shouldn\u0027t say that it\u0027s changing keystone.pot.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1, use class variable message to replace"},{"line_number":17,"context_line":"using __doc__"},{"line_number":18,"context_line":"2, update new REST API return messages"},{"line_number":19,"context_line":"into keystone.pot"},{"line_number":20,"context_line":"3, modify wsgi.render_exception function to"},{"line_number":21,"context_line":"support unicode messages"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPX%2F%2FvgQ%3D","line":19,"in_reply_to":"AAAAPX%2F%2F0FA%3D","updated":"2013-06-11 20:44:37.000000000","message":"commit messages should explain why things are changing... the commit itself describes the what. if you have to enumerate changes like this as a summary, then that suggests that the commit is too complex to review.\n\neither rip out this change list, or break down the commit into discrete changes","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1, use class variable message to replace"},{"line_number":17,"context_line":"using __doc__"},{"line_number":18,"context_line":"2, update new REST API return messages"},{"line_number":19,"context_line":"into keystone.pot"},{"line_number":20,"context_line":"3, modify wsgi.render_exception function to"},{"line_number":21,"context_line":"support unicode messages"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPX%2F%2Fpkk%3D","line":19,"in_reply_to":"AAAAPX%2F%2F0FA%3D","updated":"2013-06-13 14:21:00.000000000","message":"sorry, I forgot to update the commit message","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1, use class variable message to replace"},{"line_number":17,"context_line":"using __doc__"},{"line_number":18,"context_line":"2, update new REST API return messages"},{"line_number":19,"context_line":"into keystone.pot"},{"line_number":20,"context_line":"3, modify wsgi.render_exception function to"},{"line_number":21,"context_line":"support unicode messages"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPX%2F%2Fpkg%3D","line":19,"in_reply_to":"AAAAPX%2F%2FvgQ%3D","updated":"2013-06-13 14:21:00.000000000","message":"sure,I\u0027ll update the commit message in my new patch","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8155137e4030f8ddaf6901d5c22ddb564334d60a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     jiataotj \u003cjiataotj@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-07-25 11:51:05 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement exception module i18n support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The doc string in exception.py of Keystone"},{"line_number":10,"context_line":"will be returned with __doc__ method, but"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"AAAAQn%2F%2FpXw%3D","line":7,"updated":"2013-07-25 20:59:40.000000000","message":"the one line summary is the only one that needs to be shorter than the rest","commit_id":"8b0060a4a8e8c3cbe40b050b9cb857f52de5075b"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8155137e4030f8ddaf6901d5c22ddb564334d60a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"class __doc__"},{"line_number":18,"context_line":"2, modify wsgi.render_exception function using"},{"line_number":19,"context_line":"unicode function to replace str function"},{"line_number":20,"context_line":"3, modify/add UT test cases"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Fixes: bug # 1179425"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"AAAAQn%2F%2FpX0%3D","line":20,"updated":"2013-07-25 20:59:40.000000000","message":"wrap the rest of your commit messages at 79 char, not whatever this is","commit_id":"8b0060a4a8e8c3cbe40b050b9cb857f52de5075b"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"2342fb63e72612a1ea090140bcd31760a4150980","unresolved":false,"context_lines":[{"line_number":17,"context_line":"class __doc__"},{"line_number":18,"context_line":"2, modify wsgi.render_exception function using"},{"line_number":19,"context_line":"unicode function to replace str function"},{"line_number":20,"context_line":"3, modify/add UT test cases"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Fixes: bug # 1179425"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"AAAAQn%2F%2Fo2M%3D","line":20,"in_reply_to":"AAAAQn%2F%2FpX0%3D","updated":"2013-07-26 02:36:45.000000000","message":"Thanks for your comments, I\u0027ll clean commit message","commit_id":"8b0060a4a8e8c3cbe40b050b9cb857f52de5075b"}],"keystone/common/wsgi.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    if isinstance(error.message, unicode):"},{"line_number":525,"context_line":"        msg \u003d error.message"},{"line_number":526,"context_line":"    else:"},{"line_number":527,"context_line":"        msg \u003d str(error)"},{"line_number":528,"context_line":"    body \u003d {\u0027error\u0027: {"},{"line_number":529,"context_line":"        \u0027code\u0027: error.code,"},{"line_number":530,"context_line":"        \u0027title\u0027: error.title,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fvfw%3D","line":527,"updated":"2013-06-11 20:44:37.000000000","message":"... why not just cast with unicode() all the time? using str() at all was obviously short sighted","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    if isinstance(error.message, unicode):"},{"line_number":525,"context_line":"        msg \u003d error.message"},{"line_number":526,"context_line":"    else:"},{"line_number":527,"context_line":"        msg \u003d str(error)"},{"line_number":528,"context_line":"    body \u003d {\u0027error\u0027: {"},{"line_number":529,"context_line":"        \u0027code\u0027: error.code,"},{"line_number":530,"context_line":"        \u0027title\u0027: error.title,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fpks%3D","line":527,"in_reply_to":"AAAAPX%2F%2Fvfw%3D","updated":"2013-06-13 14:21:00.000000000","message":"according to my experience, when error contains unicode string, str() function will throw ascii encoding error, but I\u0027m not sure whether I can completely use msg \u003d error.message to replace it, so I still use it to handle non-unicode.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"}],"keystone/exception.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Tests use this to make exception message format errors fatal"},{"line_number":27,"context_line":"_FATAL_EXCEPTION_FORMAT_ERRORS \u003d False"},{"line_number":28,"context_line":"gettextutils.install(\u0027keystone\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Error(StandardError):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65w%3D","line":28,"updated":"2013-06-06 00:02:11.000000000","message":"I don\u0027t understand this change... doesn\u0027t this get done once when the keystone server starts? If so, seems like there\u0027s a better place for it (for example, in bin/keystone-all).","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"43d7758e2228c6edd0cd86f704d3b066d0bb2da0","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Tests use this to make exception message format errors fatal"},{"line_number":27,"context_line":"_FATAL_EXCEPTION_FORMAT_ERRORS \u003d False"},{"line_number":28,"context_line":"gettextutils.install(\u0027keystone\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Error(StandardError):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F6fM%3D","line":28,"in_reply_to":"AAAAPX%2F%2F65w%3D","updated":"2013-06-06 03:36:12.000000000","message":"yes,you are right, this can be done when the keystone server starts, because it is in bin/keystone-all already.\nIn order to run test_exception after implement exception.py i18n support,I add this, if not, when run test_exception, the \"_\" function can\u0027t be found error occur.","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                if isinstance(message, unicode):"},{"line_number":44,"context_line":"                    message \u003d unicode(message, \u0027utf-8\u0027)"},{"line_number":45,"context_line":"                    self.message \u003d self._build_message(message, **kwargs)"},{"line_number":46,"context_line":"            self.message \u003d self._build_message(message, **kwargs)"},{"line_number":47,"context_line":"        except KeyError as e:"},{"line_number":48,"context_line":"            # if you see this warning in your logs, please raise a bug report"},{"line_number":49,"context_line":"            if _FATAL_EXCEPTION_FORMAT_ERRORS:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65s%3D","line":46,"updated":"2013-06-06 00:02:11.000000000","message":"this is the same as the previous line, so they\u0027ll both get run if no message. Seems like a mistake.","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"43d7758e2228c6edd0cd86f704d3b066d0bb2da0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                if isinstance(message, unicode):"},{"line_number":44,"context_line":"                    message \u003d unicode(message, \u0027utf-8\u0027)"},{"line_number":45,"context_line":"                    self.message \u003d self._build_message(message, **kwargs)"},{"line_number":46,"context_line":"            self.message \u003d self._build_message(message, **kwargs)"},{"line_number":47,"context_line":"        except KeyError as e:"},{"line_number":48,"context_line":"            # if you see this warning in your logs, please raise a bug report"},{"line_number":49,"context_line":"            if _FATAL_EXCEPTION_FORMAT_ERRORS:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F6fI%3D","line":46,"in_reply_to":"AAAAPX%2F%2F65s%3D","updated":"2013-06-06 03:36:12.000000000","message":"yes, you are right, I\u0027ll fix it in my new patch","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class ValidationError(Error):"},{"line_number":70,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":71,"context_line":"                \"The server could not comply with the request\""},{"line_number":72,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":73,"context_line":"                \" incorrect.The client is assumed to be in error.\")"},{"line_number":74,"context_line":"    code \u003d 400"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65k%3D","line":71,"updated":"2013-06-06 00:02:11.000000000","message":"need a space at the beginning of this string-part.","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":71,"context_line":"                \"The server could not comply with the request\""},{"line_number":72,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":73,"context_line":"                \" incorrect.The client is assumed to be in error.\")"},{"line_number":74,"context_line":"    code \u003d 400"},{"line_number":75,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65o%3D","line":73,"updated":"2013-06-06 00:02:11.000000000","message":"add a space after .","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class StringLengthExceeded(ValidationError):"},{"line_number":79,"context_line":"    message \u003d _(\"String length exceeded.The length of\""},{"line_number":80,"context_line":"                \" string \u0027%(string)s\u0027 exceeded the limit\""},{"line_number":81,"context_line":"                \" of column %(type)s(CHAR(%(length)d)).\")"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65g%3D","line":80,"updated":"2013-06-06 00:02:11.000000000","message":"why change from \" to \u0027?","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class ValidationSizeError(Error):"},{"line_number":85,"context_line":"    message \u003d _(\"Request attribute %(attribute)s must be\""},{"line_number":86,"context_line":"                \" less than or equal to %(size)i.The server\""},{"line_number":87,"context_line":"                \" could not comply with the request because\""},{"line_number":88,"context_line":"                \" the attribute size is invalid (too large).\""},{"line_number":89,"context_line":"                \"The client is assumed to be in error.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65Y%3D","line":86,"updated":"2013-06-06 00:02:11.000000000","message":"Add a space after .","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                \" less than or equal to %(size)i.The server\""},{"line_number":87,"context_line":"                \" could not comply with the request because\""},{"line_number":88,"context_line":"                \" the attribute size is invalid (too large).\""},{"line_number":89,"context_line":"                \"The client is assumed to be in error.\")"},{"line_number":90,"context_line":"    code \u003d 400"},{"line_number":91,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65U%3D","line":89,"updated":"2013-06-06 00:02:11.000000000","message":"Need a space at the beginning of this string.","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"class UnexpectedError(Error):"},{"line_number":221,"context_line":"    message \u003d _(\"An unexpected error prevented the server\""},{"line_number":222,"context_line":"                \" from fulfilling your request,%(exception)s\")"},{"line_number":223,"context_line":"    code \u003d 500"},{"line_number":224,"context_line":"    title \u003d \u0027Internal Server Error\u0027"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65I%3D","line":222,"updated":"2013-06-06 00:02:11.000000000","message":"change the , back to a .\n\nalso, add a space after the .","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"4b4b8f9f810ecabd26360be9380070e58522e0ba","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Tests use this to make exception message format errors fatal"},{"line_number":27,"context_line":"_FATAL_EXCEPTION_FORMAT_ERRORS \u003d False"},{"line_number":28,"context_line":"gettextutils.install(\u0027keystone\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Error(StandardError):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPX%2F%2F5%2BI%3D","line":28,"updated":"2013-06-06 09:57:34.000000000","message":"this shouldn\u0027t be called here","commit_id":"ff283fc14aaac881c51364bd9a624a540bb61788"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"0bd9704bd2debb9e077f6d68349cec5d24da9fb0","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Tests use this to make exception message format errors fatal"},{"line_number":27,"context_line":"_FATAL_EXCEPTION_FORMAT_ERRORS \u003d False"},{"line_number":28,"context_line":"gettextutils.install(\u0027keystone\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Error(StandardError):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPX%2F%2F3k0%3D","line":28,"in_reply_to":"AAAAPX%2F%2F5%2BI%3D","updated":"2013-06-07 02:59:25.000000000","message":"yes, I know that you removed the same code line in keystone.common.config for fixing domain change issue. But if we want implement i18n support in exception.py, it seems that we need reapply this code in it, otherwise, not UT but also keystone-all service fails due to can\u0027t find \"_\" function, that\u0027s why I invite you to join this code review, because I think this may break your in https://review.openstack.org/#/c/28531\nI\u0027m afraid if we want implement the feature, we need to add this.","commit_id":"ff283fc14aaac881c51364bd9a624a540bb61788"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"4b4b8f9f810ecabd26360be9380070e58522e0ba","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class ValidationError(Error):"},{"line_number":69,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":70,"context_line":"                \" The server could not comply with the request\""},{"line_number":71,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":72,"context_line":"                \" incorrect.The client is assumed to be in error. \")"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPX%2F%2F594%3D","line":69,"updated":"2013-06-06 09:57:34.000000000","message":"But yes, you need gettext.install() to be called before you import this module since you\u0027re translating this string at import time","commit_id":"ff283fc14aaac881c51364bd9a624a540bb61788"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0acf06ffe6a1d5d667de2ad555c3c10c245c03ca","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Tests use this to make exception message format errors fatal"},{"line_number":27,"context_line":"_FATAL_EXCEPTION_FORMAT_ERRORS \u003d False"},{"line_number":28,"context_line":"gettextutils.install(\u0027keystone\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Error(StandardError):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F0E4%3D","line":28,"updated":"2013-06-09 15:36:10.000000000","message":"If this only affects tests, then move it into the test parts.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Tests use this to make exception message format errors fatal"},{"line_number":27,"context_line":"_FATAL_EXCEPTION_FORMAT_ERRORS \u003d False"},{"line_number":28,"context_line":"gettextutils.install(\u0027keystone\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Error(StandardError):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FvfA%3D","line":28,"in_reply_to":"AAAAPX%2F%2F0E4%3D","updated":"2013-06-11 20:44:37.000000000","message":"i have no idea what this line is doing, but it definitely doesn\u0027t have anything to do with the comment it\u0027s following \"Tests use this to make exception message format errors fatal\"","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Tests use this to make exception message format errors fatal"},{"line_number":27,"context_line":"_FATAL_EXCEPTION_FORMAT_ERRORS \u003d False"},{"line_number":28,"context_line":"gettextutils.install(\u0027keystone\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Error(StandardError):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fpl8%3D","line":28,"in_reply_to":"AAAAPX%2F%2F0E4%3D","updated":"2013-06-13 14:21:00.000000000","message":"ok, I\u0027ll check whether move it into test parts can work","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0acf06ffe6a1d5d667de2ad555c3c10c245c03ca","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":70,"context_line":"                \" The server could not comply with the request\""},{"line_number":71,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":72,"context_line":"                \" incorrect.The client is assumed to be in error. \")"},{"line_number":73,"context_line":"    code \u003d 400"},{"line_number":74,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F0E0%3D","line":72,"updated":"2013-06-09 15:36:10.000000000","message":"Remove the space at the end of the string.\n\nChange \"incorrect.The\" to \"incorrect. The\" (add a space)","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":70,"context_line":"                \" The server could not comply with the request\""},{"line_number":71,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":72,"context_line":"                \" incorrect.The client is assumed to be in error. \")"},{"line_number":73,"context_line":"    code \u003d 400"},{"line_number":74,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fpl0%3D","line":72,"in_reply_to":"AAAAPX%2F%2F0E0%3D","updated":"2013-06-13 14:21:00.000000000","message":"I\u0027ll change the format in my new patch","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":70,"context_line":"                \" The server could not comply with the request\""},{"line_number":71,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":72,"context_line":"                \" incorrect.The client is assumed to be in error. \")"},{"line_number":73,"context_line":"    code \u003d 400"},{"line_number":74,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FuhQ%3D","line":72,"in_reply_to":"AAAAPX%2F%2F0E0%3D","updated":"2013-06-11 20:44:37.000000000","message":"This is why doc strings are so much better here...","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":70,"context_line":"                \" The server could not comply with the request\""},{"line_number":71,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":72,"context_line":"                \" incorrect.The client is assumed to be in error. \")"},{"line_number":73,"context_line":"    code \u003d 400"},{"line_number":74,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fplw%3D","line":72,"in_reply_to":"AAAAPX%2F%2FuhQ%3D","updated":"2013-06-13 14:21:00.000000000","message":"yes, agree, I\u0027ll change the format in my new patch","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0acf06ffe6a1d5d667de2ad555c3c10c245c03ca","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class AuthPluginException(Unauthorized):"},{"line_number":111,"context_line":"    \"\"\"Authentication plugin error.\"\"\""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":114,"context_line":"        super(AuthPluginException, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F0EU%3D","line":111,"updated":"2013-06-09 15:36:10.000000000","message":"This one should be translated, too.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class AuthPluginException(Unauthorized):"},{"line_number":111,"context_line":"    \"\"\"Authentication plugin error.\"\"\""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":114,"context_line":"        super(AuthPluginException, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FuhA%3D","line":111,"in_reply_to":"AAAAPX%2F%2F0EU%3D","updated":"2013-06-11 20:44:37.000000000","message":"I\u0027m not sure it\u0027s ever raised intentionally","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class AuthPluginException(Unauthorized):"},{"line_number":111,"context_line":"    \"\"\"Authentication plugin error.\"\"\""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":114,"context_line":"        super(AuthPluginException, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fplc%3D","line":111,"in_reply_to":"AAAAPX%2F%2FuhA%3D","updated":"2013-06-13 14:21:00.000000000","message":"I think if customer\u0027s message isn\u0027t assigned to an AuthPluginException instance, the doc string will be returned, so it should be translated. I\u0027ll write a UT test case to verify it.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"7783418b5c6a7e63409bf53f9fdadb3e028d0b1d","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from keystone.common import config"},{"line_number":19,"context_line":"from keystone.common import logging"},{"line_number":20,"context_line":"from keystone.openstack.common.gettextutils import _  # NOQA"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"CONF \u003d config.CONF"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPn%2F%2Fwsw%3D","line":20,"updated":"2013-06-21 20:56:04.000000000","message":"why do you need this here?   nova just uses gettextutils.install(\u0027nova\u0027) in the binaries (cmd files)","commit_id":"75d3efd599edaa477e3c7b1cd68a34566e5b8a53"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"3c02f7bc646559df7ad4c445f7e05278e8df9c7a","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from keystone.common import config"},{"line_number":19,"context_line":"from keystone.common import logging"},{"line_number":20,"context_line":"from keystone.openstack.common.gettextutils import _  # NOQA"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"CONF \u003d config.CONF"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPn%2F%2Fvok%3D","line":20,"in_reply_to":"AAAAPn%2F%2Fwsw%3D","updated":"2013-06-23 06:11:56.000000000","message":"we have gettextutils.install(\u0027keystone\u0027) in keystone cmd files too.without the code line, when run UT test case in \"test_exception\", \"_\" function can not be recognized. I belive the issue will occur when other component call exception module without the code line","commit_id":"75d3efd599edaa477e3c7b1cd68a34566e5b8a53"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"391c94100341933ac90b1469dacf803cf9063915","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from keystone.common import config"},{"line_number":19,"context_line":"from keystone.common import logging"},{"line_number":20,"context_line":"from keystone.openstack.common.gettextutils import _  # noqa"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"CONF \u003d config.CONF"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPn%2F%2FtYE%3D","line":20,"updated":"2013-06-24 19:49:25.000000000","message":"When I removed this line and ran \u0027tox -epy27 -- test_exception\u0027 everything worked.\n\nhttp://paste.openstack.org/show/39176/","commit_id":"d6528a682ac5646bce56181bf45c5363624ae8bc"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"28ebbcc436f7ed244a6bac11b0279c184591a528","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from keystone.common import config"},{"line_number":19,"context_line":"from keystone.common import logging"},{"line_number":20,"context_line":"from keystone.openstack.common.gettextutils import _  # noqa"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"CONF \u003d config.CONF"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPn%2F%2FtKE%3D","line":20,"in_reply_to":"AAAAPn%2F%2FtYE%3D","updated":"2013-06-24 21:25:25.000000000","message":"Try actually running keystone-all","commit_id":"d6528a682ac5646bce56181bf45c5363624ae8bc"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2b2807ecdd16ccd77f8da020b60ef2bb24f2a58","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# flake8: noqa"},{"line_number":18,"context_line":"import re"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from keystone.common import config"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FcAs%3D","line":17,"updated":"2013-07-01 22:54:49.000000000","message":"submit a new review that gets rid of this line.","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"b2317f5a33494e752c69b3415d584660da89f73e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# flake8: noqa"},{"line_number":18,"context_line":"import re"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from keystone.common import config"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2Fbjk%3D","line":17,"in_reply_to":"AAAAPn%2F%2FcAs%3D","updated":"2013-07-02 05:53:08.000000000","message":"ok, hope the version 0.5.6 hacking code is applied","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2b2807ecdd16ccd77f8da020b60ef2bb24f2a58","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \"\"\"Base error class."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    Child classes should define an HTTP status code, title, and a"},{"line_number":36,"context_line":"    return message."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    code \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FcAk%3D","line":36,"updated":"2013-07-01 22:54:49.000000000","message":"remove \"return\"","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2b2807ecdd16ccd77f8da020b60ef2bb24f2a58","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def __init__(self, message\u003dNone, **kwargs):"},{"line_number":43,"context_line":"        try:"},{"line_number":44,"context_line":"            if not message:"},{"line_number":45,"context_line":"                if isinstance(message, unicode):"},{"line_number":46,"context_line":"                    message \u003d unicode(message, \u0027utf-8\u0027)"},{"line_number":47,"context_line":"            self.message \u003d self._build_message(message, **kwargs)"},{"line_number":48,"context_line":"        except KeyError as e:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FcAg%3D","line":45,"updated":"2013-07-01 22:54:49.000000000","message":"why check for message is unicode if not message?","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"b2317f5a33494e752c69b3415d584660da89f73e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def __init__(self, message\u003dNone, **kwargs):"},{"line_number":43,"context_line":"        try:"},{"line_number":44,"context_line":"            if not message:"},{"line_number":45,"context_line":"                if isinstance(message, unicode):"},{"line_number":46,"context_line":"                    message \u003d unicode(message, \u0027utf-8\u0027)"},{"line_number":47,"context_line":"            self.message \u003d self._build_message(message, **kwargs)"},{"line_number":48,"context_line":"        except KeyError as e:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FbjY%3D","line":45,"in_reply_to":"AAAAPn%2F%2FcAg%3D","updated":"2013-07-02 05:53:08.000000000","message":"for non-unicode string, using unicode function to encoding it may cause ascii encoding exception, that\u0027s why I check whether the message is unicode here","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2b2807ecdd16ccd77f8da020b60ef2bb24f2a58","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                raise e"},{"line_number":52,"context_line":"            else:"},{"line_number":53,"context_line":"                LOG.warning(_(\u0027missing exception kwargs (programmer error)\u0027))"},{"line_number":54,"context_line":"                message \u003d self.message"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        super(Error, self).__init__(self.message)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FcAU%3D","line":54,"updated":"2013-07-01 22:54:49.000000000","message":"this isn\u0027t doing anything now because the code at line 56 uses self.message.","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"b2317f5a33494e752c69b3415d584660da89f73e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                raise e"},{"line_number":52,"context_line":"            else:"},{"line_number":53,"context_line":"                LOG.warning(_(\u0027missing exception kwargs (programmer error)\u0027))"},{"line_number":54,"context_line":"                message \u003d self.message"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        super(Error, self).__init__(self.message)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FbjU%3D","line":54,"in_reply_to":"AAAAPn%2F%2FcAU%3D","updated":"2013-07-02 05:53:08.000000000","message":"yes, agree, I\u0027ll remove this line","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2b2807ecdd16ccd77f8da020b60ef2bb24f2a58","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        if not message:"},{"line_number":65,"context_line":"            message \u003d re.sub(\u0027[ \\n]+\u0027, \u0027 \u0027, self.message % kwargs)"},{"line_number":66,"context_line":"            message \u003d message.strip()"},{"line_number":67,"context_line":"        return message"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FcAM%3D","line":65,"updated":"2013-07-01 22:54:49.000000000","message":"Looks like we don\u0027t need to do re.sub() anymore because you\u0027ve changed all the messages so that they don\u0027t have extra whitespace.","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"b2317f5a33494e752c69b3415d584660da89f73e","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        if not message:"},{"line_number":65,"context_line":"            message \u003d re.sub(\u0027[ \\n]+\u0027, \u0027 \u0027, self.message % kwargs)"},{"line_number":66,"context_line":"            message \u003d message.strip()"},{"line_number":67,"context_line":"        return message"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FbjM%3D","line":65,"in_reply_to":"AAAAPn%2F%2FcAM%3D","updated":"2013-07-02 05:53:08.000000000","message":"you are right, we just need to use \"self.message % kwargs\"","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2b2807ecdd16ccd77f8da020b60ef2bb24f2a58","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        if not message:"},{"line_number":65,"context_line":"            message \u003d re.sub(\u0027[ \\n]+\u0027, \u0027 \u0027, self.message % kwargs)"},{"line_number":66,"context_line":"            message \u003d message.strip()"},{"line_number":67,"context_line":"        return message"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FcAA%3D","line":66,"updated":"2013-07-01 22:54:49.000000000","message":"don\u0027t need to strip() either.","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2b2807ecdd16ccd77f8da020b60ef2bb24f2a58","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class Conflict(Error):"},{"line_number":209,"context_line":"    message \u003d _(\"Conflict occurred attempting to store %(type)s.\""},{"line_number":210,"context_line":"                \"%(details)s\")"},{"line_number":211,"context_line":"    code \u003d 409"},{"line_number":212,"context_line":"    title \u003d \u0027Conflict\u0027"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2Fb%2F4%3D","line":210,"updated":"2013-07-01 22:54:49.000000000","message":"add a space at the beginning of the string on this line.","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"b2317f5a33494e752c69b3415d584660da89f73e","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class Conflict(Error):"},{"line_number":209,"context_line":"    message \u003d _(\"Conflict occurred attempting to store %(type)s.\""},{"line_number":210,"context_line":"                \"%(details)s\")"},{"line_number":211,"context_line":"    code \u003d 409"},{"line_number":212,"context_line":"    title \u003d \u0027Conflict\u0027"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPn%2F%2FbjI%3D","line":210,"in_reply_to":"AAAAPn%2F%2Fb%2F4%3D","updated":"2013-07-02 05:53:08.000000000","message":"ok","commit_id":"0a3092e225c4fa8b898818b19951086d501cf251"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0249dd4537394f3a39fa1dc152a8971a179d062e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"Base error class."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Child classes should define an HTTP status code, title, and a"},{"line_number":33,"context_line":"    return message."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":"    code \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FViM%3D","line":33,"updated":"2013-07-03 19:14:58.000000000","message":"remove \"return\"","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"76d3a0c6b04bf3f0312ae5fa4fad2f16c24588f5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"Base error class."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Child classes should define an HTTP status code, title, and a"},{"line_number":33,"context_line":"    return message."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":"    code \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FUNc%3D","line":33,"in_reply_to":"AAAAPn%2F%2FViM%3D","updated":"2013-07-04 07:27:36.000000000","message":"sorry, I forgot to remove it, I\u0027ll remove it in my new patch","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0249dd4537394f3a39fa1dc152a8971a179d062e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    def __init__(self, message\u003dNone, **kwargs):"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            if not message:"},{"line_number":42,"context_line":"                if isinstance(message, unicode):"},{"line_number":43,"context_line":"                    message \u003d unicode(message, \u0027utf-8\u0027)"},{"line_number":44,"context_line":"            self.message \u003d self._build_message(message, **kwargs)"},{"line_number":45,"context_line":"        except KeyError as e:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FViI%3D","line":42,"updated":"2013-07-03 19:14:58.000000000","message":"why check for message is unicode if not message? message could only be None or an empty string, so what\u0027s the difference if it\u0027s unicode or not?","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"76d3a0c6b04bf3f0312ae5fa4fad2f16c24588f5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    def __init__(self, message\u003dNone, **kwargs):"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            if not message:"},{"line_number":42,"context_line":"                if isinstance(message, unicode):"},{"line_number":43,"context_line":"                    message \u003d unicode(message, \u0027utf-8\u0027)"},{"line_number":44,"context_line":"            self.message \u003d self._build_message(message, **kwargs)"},{"line_number":45,"context_line":"        except KeyError as e:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FUNA%3D","line":42,"in_reply_to":"AAAAPn%2F%2FViI%3D","updated":"2013-07-04 07:27:36.000000000","message":"yes, you are right, code logic isn\u0027t right, I\u0027ll correct it in my new patch, thanks for your comments","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"ade75e98392183b0dbc669ead28d7694369ec92a","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":67,"context_line":"                \" The server could not comply with the request\""},{"line_number":68,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":69,"context_line":"                \" incorrect. The client is assumed to be in error.\")"},{"line_number":70,"context_line":"    code \u003d 400"},{"line_number":71,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FVgg%3D","line":69,"updated":"2013-07-03 19:22:36.000000000","message":"I don\u0027t think using message for this attribute name is a good idea, since it shadows Exception.message - use msg_format or similar. See I304f31edec20b1293cf6c8de931415590fde6752","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"76d3a0c6b04bf3f0312ae5fa4fad2f16c24588f5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    message \u003d _(\"Expecting to find %(attribute)s in %(target)s.\""},{"line_number":67,"context_line":"                \" The server could not comply with the request\""},{"line_number":68,"context_line":"                \" since it is either malformed or otherwise\""},{"line_number":69,"context_line":"                \" incorrect. The client is assumed to be in error.\")"},{"line_number":70,"context_line":"    code \u003d 400"},{"line_number":71,"context_line":"    title \u003d \u0027Bad Request\u0027"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FUNQ%3D","line":69,"in_reply_to":"AAAAPn%2F%2FVgg%3D","updated":"2013-07-04 07:27:36.000000000","message":"thanks for your comments, I\u0027ll apply same code style in my patch","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c1668d3017c7408e5493a011d1b82c435141380","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        except KeyError as e:"},{"line_number":44,"context_line":"            # if you see this warning in your logs, please raise a bug report"},{"line_number":45,"context_line":"            if _FATAL_EXCEPTION_FORMAT_ERRORS:"},{"line_number":46,"context_line":"                raise e"},{"line_number":47,"context_line":"            else:"},{"line_number":48,"context_line":"                LOG.warning(_(\u0027missing exception kwargs (programmer error)\u0027))"},{"line_number":49,"context_line":"                message \u003d self.msg_fmt"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAQn%2F%2F%2FG0%3D","line":46,"updated":"2013-07-17 23:57:17.000000000","message":"What\u0027s the purpose of this change?","commit_id":"7e5a8cb94211e2a3de84ba2013f05184772c2525"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"4a1f61944e39a51e424c264aa8eedc8914405d74","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        except KeyError as e:"},{"line_number":44,"context_line":"            # if you see this warning in your logs, please raise a bug report"},{"line_number":45,"context_line":"            if _FATAL_EXCEPTION_FORMAT_ERRORS:"},{"line_number":46,"context_line":"                raise e"},{"line_number":47,"context_line":"            else:"},{"line_number":48,"context_line":"                LOG.warning(_(\u0027missing exception kwargs (programmer error)\u0027))"},{"line_number":49,"context_line":"                message \u003d self.msg_fmt"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAQn%2F%2F%2BLA%3D","line":46,"in_reply_to":"AAAAQn%2F%2F%2FG0%3D","updated":"2013-07-18 08:41:17.000000000","message":"I didn\u0027t notice this change when I was doing merging for rebase, I\u0027ll remove it","commit_id":"7e5a8cb94211e2a3de84ba2013f05184772c2525"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c1668d3017c7408e5493a011d1b82c435141380","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        if not message:"},{"line_number":60,"context_line":"            self.msg_fmt \u003d self.msg_fmt % kwargs"},{"line_number":61,"context_line":"            message \u003d self.msg_fmt"},{"line_number":62,"context_line":"        return message"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAQn%2F%2F%2FGk%3D","line":60,"updated":"2013-07-17 23:57:17.000000000","message":"functions shouldn\u0027t have side-effects if they\u0027re not necessary. In this case, it looks like this is going to change a class-scoped member so that next time the exception is raised its msg_fmt is going to be different.","commit_id":"7e5a8cb94211e2a3de84ba2013f05184772c2525"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"0022c53f1392f8fa6bd034b3830ce151065b9911","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        if not message:"},{"line_number":60,"context_line":"            self.msg_fmt \u003d self.msg_fmt % kwargs"},{"line_number":61,"context_line":"            message \u003d self.msg_fmt"},{"line_number":62,"context_line":"        return message"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAQn%2F%2F9%2BI%3D","line":60,"in_reply_to":"AAAAQn%2F%2F%2FGk%3D","updated":"2013-07-18 09:58:46.000000000","message":"Brant,\nI\u0027d like to correct my wrong statements. We can apply \"msg_fmt\", I add a new\nfunction \"format_message\" after learning Mark\u0027s code patches for nova, then we don\u0027t\nneed to check unicode in wsgi.render_exception function to avoid unicode encoding \nerror and successfully implement the module\u0027s i18n support. Sorry for any misleading,\nplease review my new patch.","commit_id":"7e5a8cb94211e2a3de84ba2013f05184772c2525"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"4a1f61944e39a51e424c264aa8eedc8914405d74","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        if not message:"},{"line_number":60,"context_line":"            self.msg_fmt \u003d self.msg_fmt % kwargs"},{"line_number":61,"context_line":"            message \u003d self.msg_fmt"},{"line_number":62,"context_line":"        return message"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAQn%2F%2F%2BKc%3D","line":60,"in_reply_to":"AAAAQn%2F%2F%2FGk%3D","updated":"2013-07-18 08:41:17.000000000","message":"I do this change in order to fix test_wsgi.test_middleware_exception_error failure due \nto apply msg_fmt. I recheck it in running system, you are right, it change class-\nscoped member, then error message is impacted.\nSo I think we\u0027d better not use msg_fmt to replace class member message, I\u0027ll roll\n back to my previous solution, it works well.","commit_id":"7e5a8cb94211e2a3de84ba2013f05184772c2525"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"f34d2f7bb3214253dc7df09b6bf9a5189dc828d6","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        if not message:"},{"line_number":60,"context_line":"            self.msg_fmt \u003d self.msg_fmt % kwargs"},{"line_number":61,"context_line":"            message \u003d self.msg_fmt"},{"line_number":62,"context_line":"        return message"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAQn%2F%2F95Y%3D","line":60,"in_reply_to":"AAAAQn%2F%2F%2FGk%3D","updated":"2013-07-18 10:21:45.000000000","message":"The simplest and reasonable way to fix all issue is applying msg_fmt and using unicode to replace str in wsgi.render_exception. Please review my newest patch","commit_id":"7e5a8cb94211e2a3de84ba2013f05184772c2525"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8026009a96b8ac5f453f4ad41a9331a893e5dd5d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"Base error class."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Child classes should define an HTTP status code, title, and a"},{"line_number":33,"context_line":"    message."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":"    code \u003d None"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAQn%2F%2FpYI%3D","line":33,"updated":"2013-07-25 20:57:41.000000000","message":"self.code and self.title are actual class attributes, but self.message !\u003d self.msg_fmt .. i find that a bit misleading. it\u0027d also be nice if \u0027msg_fmt\u0027 was a bit more intuitively named as well, it seems unnecessarily cryptic","commit_id":"8b0060a4a8e8c3cbe40b050b9cb857f52de5075b"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"2342fb63e72612a1ea090140bcd31760a4150980","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"Base error class."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Child classes should define an HTTP status code, title, and a"},{"line_number":33,"context_line":"    message."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":"    code \u003d None"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAQn%2F%2Fo2I%3D","line":33,"in_reply_to":"AAAAQn%2F%2FpYI%3D","updated":"2013-07-26 02:36:45.000000000","message":"yes, I agree, I\u0027ll correct this comment and use msg_format to replace msg_fmt to avoid any misleading","commit_id":"8b0060a4a8e8c3cbe40b050b9cb857f52de5075b"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8155137e4030f8ddaf6901d5c22ddb564334d60a","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    msg_fmt \u003d _(\"An unhandled exception has occurred:\""},{"line_number":153,"context_line":"                \" Could not find metadata.\")"},{"line_number":154,"context_line":"    # (dolph): metadata is not a user-facing concept,"},{"line_number":155,"context_line":"    #          so this exception should not be exposed"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class PolicyNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAQn%2F%2FpXs%3D","line":155,"updated":"2013-07-25 20:59:40.000000000","message":"this could be made into a docstr now","commit_id":"8b0060a4a8e8c3cbe40b050b9cb857f52de5075b"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"2342fb63e72612a1ea090140bcd31760a4150980","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    msg_fmt \u003d _(\"An unhandled exception has occurred:\""},{"line_number":153,"context_line":"                \" Could not find metadata.\")"},{"line_number":154,"context_line":"    # (dolph): metadata is not a user-facing concept,"},{"line_number":155,"context_line":"    #          so this exception should not be exposed"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class PolicyNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAQn%2F%2Fo2A%3D","line":155,"in_reply_to":"AAAAQn%2F%2FpXs%3D","updated":"2013-07-26 02:36:45.000000000","message":"I\u0027ll change this into a docstr","commit_id":"8b0060a4a8e8c3cbe40b050b9cb857f52de5075b"}],"tests/test_exception.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        attribute \u003d uuid.uuid4().hex"},{"line_number":67,"context_line":"        e \u003d exception.ValidationError(target\u003dtarget, attribute\u003dattribute)"},{"line_number":68,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":69,"context_line":"        self.assertIn(target, e.message)"},{"line_number":70,"context_line":"        self.assertIn(attribute, e.message)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_not_found(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F65E%3D","line":69,"updated":"2013-06-06 00:02:11.000000000","message":"why doesn\u0027t str(e) work anymore? Seems like this change could be made so that str(e) still works the way it did before.","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"43d7758e2228c6edd0cd86f704d3b066d0bb2da0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        attribute \u003d uuid.uuid4().hex"},{"line_number":67,"context_line":"        e \u003d exception.ValidationError(target\u003dtarget, attribute\u003dattribute)"},{"line_number":68,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":69,"context_line":"        self.assertIn(target, e.message)"},{"line_number":70,"context_line":"        self.assertIn(attribute, e.message)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_not_found(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F6gE%3D","line":69,"in_reply_to":"AAAAPX%2F%2F65E%3D","updated":"2013-06-06 03:36:12.000000000","message":"str(e) will thrown ascii encoding error when work against unicode message, we shouldn\u0027t use it.","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0acf06ffe6a1d5d667de2ad555c3c10c245c03ca","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        risky_info \u003d uuid.uuid4().hex"},{"line_number":124,"context_line":"        action \u003d uuid.uuid4().hex"},{"line_number":125,"context_line":"        e \u003d exception.ForbiddenAction(action\u003daction)"},{"line_number":126,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":127,"context_line":"        self.assertNotIn(risky_info, e.message)"},{"line_number":128,"context_line":"        self.assertIn(action, e.message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F0EA%3D","line":125,"updated":"2013-06-09 15:36:10.000000000","message":"This seems to be changing an interesting test. Suggest change it back.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        risky_info \u003d uuid.uuid4().hex"},{"line_number":124,"context_line":"        action \u003d uuid.uuid4().hex"},{"line_number":125,"context_line":"        e \u003d exception.ForbiddenAction(action\u003daction)"},{"line_number":126,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":127,"context_line":"        self.assertNotIn(risky_info, e.message)"},{"line_number":128,"context_line":"        self.assertIn(action, e.message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fugo%3D","line":125,"in_reply_to":"AAAAPX%2F%2F0EA%3D","updated":"2013-06-11 20:44:37.000000000","message":"-2; this is explicitly bypassing the goal of the test and represents the introduction of a security vulnerability/exposure","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        risky_info \u003d uuid.uuid4().hex"},{"line_number":124,"context_line":"        action \u003d uuid.uuid4().hex"},{"line_number":125,"context_line":"        e \u003d exception.ForbiddenAction(action\u003daction)"},{"line_number":126,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":127,"context_line":"        self.assertNotIn(risky_info, e.message)"},{"line_number":128,"context_line":"        self.assertIn(action, e.message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FpmM%3D","line":125,"in_reply_to":"AAAAPX%2F%2F0EA%3D","updated":"2013-06-13 14:21:00.000000000","message":"sure, I\u0027ll change it back in my new patch","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0acf06ffe6a1d5d667de2ad555c3c10c245c03ca","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        action \u003d uuid.uuid4().hex"},{"line_number":125,"context_line":"        e \u003d exception.ForbiddenAction(action\u003daction)"},{"line_number":126,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":127,"context_line":"        self.assertNotIn(risky_info, e.message)"},{"line_number":128,"context_line":"        self.assertIn(action, e.message)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        e \u003d exception.ForbiddenAction(action\u003drisky_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F0EE%3D","line":127,"updated":"2013-06-09 15:36:10.000000000","message":"this assert seems useless now, how would the contents of variable wind up in a message that can\u0027t know anything about it? Remove this line.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        action \u003d uuid.uuid4().hex"},{"line_number":125,"context_line":"        e \u003d exception.ForbiddenAction(action\u003daction)"},{"line_number":126,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":127,"context_line":"        self.assertNotIn(risky_info, e.message)"},{"line_number":128,"context_line":"        self.assertIn(action, e.message)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        e \u003d exception.ForbiddenAction(action\u003drisky_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FugE%3D","line":127,"in_reply_to":"AAAAPX%2F%2F0EE%3D","updated":"2013-06-11 20:44:37.000000000","message":"valid point, but instead keep this line in the test. it\u0027s explicitly asserting that with debug\u003dFalse you can\u0027t override the generic message","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        action \u003d uuid.uuid4().hex"},{"line_number":125,"context_line":"        e \u003d exception.ForbiddenAction(action\u003daction)"},{"line_number":126,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":127,"context_line":"        self.assertNotIn(risky_info, e.message)"},{"line_number":128,"context_line":"        self.assertIn(action, e.message)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        e \u003d exception.ForbiddenAction(action\u003drisky_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FpmE%3D","line":127,"in_reply_to":"AAAAPX%2F%2FugE%3D","updated":"2013-06-13 14:21:00.000000000","message":"ok, I\u0027ll keep the new code in my new patch","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"ade75e98392183b0dbc669ead28d7694369ec92a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        e \u003d exception.ValidationError(target\u003dtarget, attribute\u003dattribute)"},{"line_number":69,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":70,"context_line":"        self.assertIn(target, e.message)"},{"line_number":71,"context_line":"        self.assertIn(attribute, e.message)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_not_found(self):"},{"line_number":74,"context_line":"        target \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FVgk%3D","line":71,"updated":"2013-07-03 19:22:36.000000000","message":"The Exception.message attribute is deprecated - what was wrong with using str(e) ?","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"2ecfe92b4f5cf4ff14e15ab68a11b794ec5040de","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        e \u003d exception.ValidationError(target\u003dtarget, attribute\u003dattribute)"},{"line_number":69,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":70,"context_line":"        self.assertIn(target, e.message)"},{"line_number":71,"context_line":"        self.assertIn(attribute, e.message)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_not_found(self):"},{"line_number":74,"context_line":"        target \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAP3%2F%2Fz7c%3D","line":71,"in_reply_to":"AAAAPn%2F%2FVgk%3D","updated":"2013-07-11 03:18:50.000000000","message":"Mark,\n\n   I\u0027d like to explain why I encountered the error I mentioned in my\nprevious reply. I carelessly forgot a factor which impacted the UT\nresult.\n   In order to verify my solution via running keystone services and\ncalling API to produce translated exception message, I captured\nmessage \"The request you have made requires authentication.\" \nin exception.ValidationError into keystone.po, added some \nChinese characters as its translation and produce keystone.mo,\n then deployed mo file into default locale folder. The Chinese \ncharacters can be loaded by test_exception too, then str cause\n UnicodeEncodeError. This is the truth.\n   Str always causes UnicodeEncodeError due to its work way,\n it\u0027s unnecessary, we can remove them","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"76d3a0c6b04bf3f0312ae5fa4fad2f16c24588f5","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        e \u003d exception.ValidationError(target\u003dtarget, attribute\u003dattribute)"},{"line_number":69,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":70,"context_line":"        self.assertIn(target, e.message)"},{"line_number":71,"context_line":"        self.assertIn(attribute, e.message)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_not_found(self):"},{"line_number":74,"context_line":"        target \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2FUMs%3D","line":71,"in_reply_to":"AAAAPn%2F%2FVgk%3D","updated":"2013-07-04 07:27:36.000000000","message":"when I ran test_exception using str function, below error exist:\n\"\nTraceback (most recent call last):\n  File \"/home/jiatao/openstack/keystone/tests/test_exception.py\", line 95, in test_unauthorized_exposure\n    self.assertNotIn(risky_info, str(e.message))\nUnicodeEncodeError: \u0027ascii\u0027 codec can\u0027t encode characters in position 0-5: ordinal not in range(128)\n\"\nit\u0027s strange, I don\u0027t know why this happens.\nExcept that, I think str(e.message) isn\u0027t necessary, so I removed them","commit_id":"e0010ccef89facb2e050f2d2dfaab8c03e0f4533"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"516514c9c8b31a767128fb10f0977fe291f9492f","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":155,"context_line":"        self.assertIn(risky_info, unicode(e))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_unicode_message(self):"},{"line_number":158,"context_line":"        message \u003d u\u0027Comment \\xe7a va\u0027"},{"line_number":159,"context_line":"        e \u003d exception.Error(message)"},{"line_number":160,"context_line":"        self.assertEqual(unicode(e), message)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAQn%2F%2Fsk4%3D","line":157,"updated":"2013-07-24 21:26:30.000000000","message":"this is not a SecurityErrorTestCase, it\u0027s testing regular exceptions, so this method should be moved to the ExceptionTestCase class.\n\nActually, ExceptionTestCase already has this so I don\u0027t think it\u0027s needed.","commit_id":"6ce0559a870a200092c4a2333d41fe0c11b16f2e"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"c0e9c82b45557fb197fd0c2b4cb9f207db37bc4a","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        self.assertValidJsonRendering(e)"},{"line_number":155,"context_line":"        self.assertIn(risky_info, unicode(e))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_unicode_message(self):"},{"line_number":158,"context_line":"        message \u003d u\u0027Comment \\xe7a va\u0027"},{"line_number":159,"context_line":"        e \u003d exception.Error(message)"},{"line_number":160,"context_line":"        self.assertEqual(unicode(e), message)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAQn%2F%2Fr0k%3D","line":157,"in_reply_to":"AAAAQn%2F%2Fsk4%3D","updated":"2013-07-25 03:46:04.000000000","message":"yes, you are right, this is duplicate with same test case in ExceptionTestCase, it\u0027s unnecessary, I\u0027ll remove it","commit_id":"6ce0559a870a200092c4a2333d41fe0c11b16f2e"}],"tests/test_wsgi.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"32da5736fb79b705005d010813d8129b4009c970","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def test_render_exception(self):"},{"line_number":117,"context_line":"        e \u003d exception.Unauthorized(message\u003du\u0027\\u7f51\\u7edc\u0027)"},{"line_number":118,"context_line":"        resp \u003d wsgi.render_exception(e)"},{"line_number":119,"context_line":"        self.assertEqual(resp.status_int, 401)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class MiddlewareTest(BaseWSGITest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F64w%3D","line":119,"updated":"2013-06-06 00:02:11.000000000","message":"what is this testing? Seems like it should also be testing the response body.","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"43d7758e2228c6edd0cd86f704d3b066d0bb2da0","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def test_render_exception(self):"},{"line_number":117,"context_line":"        e \u003d exception.Unauthorized(message\u003du\u0027\\u7f51\\u7edc\u0027)"},{"line_number":118,"context_line":"        resp \u003d wsgi.render_exception(e)"},{"line_number":119,"context_line":"        self.assertEqual(resp.status_int, 401)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class MiddlewareTest(BaseWSGITest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F6gk%3D","line":119,"in_reply_to":"AAAAPX%2F%2F64w%3D","updated":"2013-06-06 03:36:12.000000000","message":"This tests whether unicode message handled by exception module can be right render. The response body can hanlde unicode message, we have test that during GVT","commit_id":"83f1640ff47f21dd5d96895b7ef370c1ac48d0a0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0acf06ffe6a1d5d667de2ad555c3c10c245c03ca","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def test_render_exception(self):"},{"line_number":117,"context_line":"        e \u003d exception.Unauthorized(message\u003du\u0027\\u7f51\\u7edc\u0027)"},{"line_number":118,"context_line":"        resp \u003d wsgi.render_exception(e)"},{"line_number":119,"context_line":"        self.assertEqual(resp.status_int, 401)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class MiddlewareTest(BaseWSGITest):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F0Ek%3D","line":119,"updated":"2013-06-09 15:36:10.000000000","message":"What\u0027s GVT? Tests should be in the unit tests so they get run often enough to prevent bugs getting through.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"128b11630cd925dc7e05b4336549f8179f441b66","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def test_render_exception(self):"},{"line_number":117,"context_line":"        e \u003d exception.Unauthorized(message\u003du\u0027\\u7f51\\u7edc\u0027)"},{"line_number":118,"context_line":"        resp \u003d wsgi.render_exception(e)"},{"line_number":119,"context_line":"        self.assertEqual(resp.status_int, 401)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class MiddlewareTest(BaseWSGITest):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2Fufk%3D","line":119,"in_reply_to":"AAAAPX%2F%2F0Ek%3D","updated":"2013-06-11 20:44:37.000000000","message":"i don\u0027t follow this comment (what \"GVT\" are you referring to?) -- test looks fine to me?","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def test_render_exception(self):"},{"line_number":117,"context_line":"        e \u003d exception.Unauthorized(message\u003du\u0027\\u7f51\\u7edc\u0027)"},{"line_number":118,"context_line":"        resp \u003d wsgi.render_exception(e)"},{"line_number":119,"context_line":"        self.assertEqual(resp.status_int, 401)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class MiddlewareTest(BaseWSGITest):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FpmQ%3D","line":119,"in_reply_to":"AAAAPX%2F%2FuWw%3D","updated":"2013-06-13 14:21:00.000000000","message":"GVT is Globalization Verification Test which test i18n/l10n support. I just want to let you know that I had done a GVT test case except UT to verify whether the new code can read unicode translation from mo file and return the unicode translation with response body together, it\u0027s a test which need to run keystone serviece and call a certain REST API.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"62ea9f3a795db8a596d8de3c9955a69270e7fa06","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def test_render_exception(self):"},{"line_number":117,"context_line":"        e \u003d exception.Unauthorized(message\u003du\u0027\\u7f51\\u7edc\u0027)"},{"line_number":118,"context_line":"        resp \u003d wsgi.render_exception(e)"},{"line_number":119,"context_line":"        self.assertEqual(resp.status_int, 401)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class MiddlewareTest(BaseWSGITest):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FpmU%3D","line":119,"in_reply_to":"AAAAPX%2F%2Fufk%3D","updated":"2013-06-13 14:21:00.000000000","message":"GVT is Globalization Verification Test which test i18n/l10n support. I just want to let you know that I had done a GVT test case except UT to verify whether the new code can read unicode translation from mo file and return the unicode translation with response body together, it\u0027s a test which need to run keystone serviece and call a certain REST API.","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"dacadcfa327afbc26e7f76ded160dca93bd75a9e","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def test_render_exception(self):"},{"line_number":117,"context_line":"        e \u003d exception.Unauthorized(message\u003du\u0027\\u7f51\\u7edc\u0027)"},{"line_number":118,"context_line":"        resp \u003d wsgi.render_exception(e)"},{"line_number":119,"context_line":"        self.assertEqual(resp.status_int, 401)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class MiddlewareTest(BaseWSGITest):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2FuWw%3D","line":119,"in_reply_to":"AAAAPX%2F%2Fufk%3D","updated":"2013-06-11 21:32:07.000000000","message":"this was in response to the comments in patch set 4...\n\nBrant Knudson: what is this testing? Seems like it should also be testing the response body.\n\nDavid Jia: This tests whether unicode message handled by exception module can be right render. The response body can hanlde unicode message, we have test that during GVT","commit_id":"15aa7cd82212302d3d40481537bb32825cda4cfe"}]}
