)]}'
{"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f6a361b1597e9f9907d198f2a493a37c412c00c8","unresolved":false,"context_lines":[{"line_number":454,"context_line":"            return None"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            return oslo_serialization.base64.decode_as_text(data)"},{"line_number":457,"context_line":"        except UnicodeDecodeError:"},{"line_number":458,"context_line":"            return oslo_serialization.base64.decode_as_bytes(data)"},{"line_number":459,"context_line":"        except TypeError:"},{"line_number":460,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_f0d0f8cb","line":457,"updated":"2016-07-15 15:00:38.000000000","message":"I can\u0027t see any way to reach this code path.  If \u0027data\u0027 is a bytes-like object, then a TypeError will be raised at line 452.  Moreover, I presume that \"data\" comes from JSON data, and as far as I can see, strings from JSON will be presented as type str, not type bytes.","commit_id":"ca62b0387f46ca39bcad5e55acf26523f8b042e7"},{"author":{"_account_id":22582,"name":"Duong Ha-Quang","email":"quangduongha@gmail.com","username":"duonghq"},"change_message_id":"bc0846d5bb9f57576cbba241d671ae2272504523","unresolved":false,"context_lines":[{"line_number":454,"context_line":"            return None"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            return oslo_serialization.base64.decode_as_text(data)"},{"line_number":457,"context_line":"        except UnicodeDecodeError:"},{"line_number":458,"context_line":"            return oslo_serialization.base64.decode_as_bytes(data)"},{"line_number":459,"context_line":"        except TypeError:"},{"line_number":460,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_91e1849d","line":457,"in_reply_to":"dada55a8_1f4f77be","updated":"2016-07-19 02:42:31.000000000","message":"I removed this method and corresponding test cases in patch set 2.\n\nThanks for your comment.","commit_id":"ca62b0387f46ca39bcad5e55acf26523f8b042e7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"cc113ae251aa8c3603ad3de3e9a03b2e4da04e2a","unresolved":false,"context_lines":[{"line_number":454,"context_line":"            return None"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            return oslo_serialization.base64.decode_as_text(data)"},{"line_number":457,"context_line":"        except UnicodeDecodeError:"},{"line_number":458,"context_line":"            return oslo_serialization.base64.decode_as_bytes(data)"},{"line_number":459,"context_line":"        except TypeError:"},{"line_number":460,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_1f4f77be","line":457,"in_reply_to":"dada55a8_355b9b56","updated":"2016-07-18 15:27:32.000000000","message":"That doesn\u0027t answer my original question, but raises a very good point: I can confirm that it appears this method is dead.  Given that, I highly recommend removing it (and its corresponding test cases) entirely—so, I agree with your first option :)","commit_id":"ca62b0387f46ca39bcad5e55acf26523f8b042e7"},{"author":{"_account_id":22582,"name":"Duong Ha-Quang","email":"quangduongha@gmail.com","username":"duonghq"},"change_message_id":"da88396d42f2157ebc229e555a5dbd4c0c328e1d","unresolved":false,"context_lines":[{"line_number":454,"context_line":"            return None"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            return oslo_serialization.base64.decode_as_text(data)"},{"line_number":457,"context_line":"        except UnicodeDecodeError:"},{"line_number":458,"context_line":"            return oslo_serialization.base64.decode_as_bytes(data)"},{"line_number":459,"context_line":"        except TypeError:"},{"line_number":460,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_355b9b56","line":457,"in_reply_to":"fad55976_f0d0f8cb","updated":"2016-07-18 04:33:44.000000000","message":"I searched through all nova source code and cannot find any usage of this method except Base64ValidationTest, so I port this method to Python 3 according test cases.\n\nSo I have 2 options here:\n- Remove this method and related test cases (I ran tox py27 and py34 with this method and Base64ValidationTest removed and no other unit test is affected)\n- Add process logic for bytearray input data and addition test case(s).\n\nI prefer 1st option because of this method is \"private\" by convention (PEP8) so other classes and OpenStack projects should not use this method directly.","commit_id":"ca62b0387f46ca39bcad5e55acf26523f8b042e7"}]}
