)]}'
{"swift/obj/diskfile.py":[{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"75ff25311e77820a80ad0539e777321c029fb293","unresolved":false,"context_lines":[{"line_number":919,"context_line":"            self._quarantine(data_file, \"not stat-able: %s\" % err)"},{"line_number":920,"context_line":"        else:"},{"line_number":921,"context_line":"            obj_size \u003d statbuf.st_size"},{"line_number":922,"context_line":"        if obj_size !\u003d metadata_size:"},{"line_number":923,"context_line":"            self._quarantine("},{"line_number":924,"context_line":"                data_file, \"metadata content-length %s does\""},{"line_number":925,"context_line":"                \" not match actual object size %s\" % ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FIlQ%3D","line":922,"updated":"2013-10-22 17:35:48.000000000","message":"While I agree that the metadata_size is not None check wasn\u0027t doing anything useful, isn\u0027t the issue that both obj_size and metadata_size could be undefined here? Seems that they should have a \"obj_size \u003d metadata_size \u003d None\" line above, and the \"is not None\" check should stay.","commit_id":"2e326f9461cadc59d0220bb1bf41726a11ce0ab2"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"79c40da45cd3e2f3babe0a3319bc78ebd8a33c4c","unresolved":false,"context_lines":[{"line_number":919,"context_line":"            self._quarantine(data_file, \"not stat-able: %s\" % err)"},{"line_number":920,"context_line":"        else:"},{"line_number":921,"context_line":"            obj_size \u003d statbuf.st_size"},{"line_number":922,"context_line":"        if obj_size !\u003d metadata_size:"},{"line_number":923,"context_line":"            self._quarantine("},{"line_number":924,"context_line":"                data_file, \"metadata content-length %s does\""},{"line_number":925,"context_line":"                \" not match actual object size %s\" % ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FHy0%3D","line":922,"in_reply_to":"AAAATH%2F%2FIlQ%3D","updated":"2013-10-22 21:03:58.000000000","message":"At line 914, metadata_size can be asserted to always be not None.  If any exception is raised in the try block at line 904, control will never be passed to line 914.  By definition, since int() never returns None, we could assert that metadata_size is always \"not None\", so that we can remove the need to check that metadata_size is not None.\n\nAs for obj_size, similar logic I believe applies. If an exception is raised at line 916, control will never pass to line 922. If an exception is not raised at line 916, then control is always passed to line 921, which will ensure the value is not None (as the OS is defined to never return None in the .st_size attribute).\n\nDoes that make sense?","commit_id":"2e326f9461cadc59d0220bb1bf41726a11ce0ab2"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"fc5eb0c9ceb10a13828ec7f981403b1e02a574b2","unresolved":false,"context_lines":[{"line_number":1145,"context_line":"        try:"},{"line_number":1146,"context_line":"            mname \u003d self._metadata[\u0027name\u0027]"},{"line_number":1147,"context_line":"        except KeyError:"},{"line_number":1148,"context_line":"            raise self._quarantine(data_file, \"missing name metadata\")"},{"line_number":1149,"context_line":"        else:"},{"line_number":1150,"context_line":"            if mname !\u003d self._name:"},{"line_number":1151,"context_line":"                self._logger.error("}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F%2BWDY%3D","line":1148,"updated":"2013-11-27 05:34:16.000000000","message":"If you just replace this raise with \"pass\" there are no unit test failures :(.","commit_id":"15c31c0373dc8f102320637908c1ed59e854a4df"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"520cc4a48fea1a3189ef6e15256ea27162a3ff69","unresolved":false,"context_lines":[{"line_number":1145,"context_line":"        try:"},{"line_number":1146,"context_line":"            mname \u003d self._metadata[\u0027name\u0027]"},{"line_number":1147,"context_line":"        except KeyError:"},{"line_number":1148,"context_line":"            raise self._quarantine(data_file, \"missing name metadata\")"},{"line_number":1149,"context_line":"        else:"},{"line_number":1150,"context_line":"            if mname !\u003d self._name:"},{"line_number":1151,"context_line":"                self._logger.error("}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F%2BV9s%3D","line":1148,"in_reply_to":"AAAATn%2F%2BWDY%3D","updated":"2013-11-27 06:10:17.000000000","message":"Agreed. But this is not a change in behavior with this commit, since _quarantine used to raise the exception itself.\n\nI\u0027ll fix the lack of unit test failures in another commit.","commit_id":"15c31c0373dc8f102320637908c1ed59e854a4df"}],"swift/obj/mem_diskfile.py":[{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"fc5eb0c9ceb10a13828ec7f981403b1e02a574b2","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        try:"},{"line_number":287,"context_line":"            mname \u003d self._metadata[\u0027name\u0027]"},{"line_number":288,"context_line":"        except KeyError:"},{"line_number":289,"context_line":"            raise self._quarantine(self._name, \"missing name metadata\")"},{"line_number":290,"context_line":"        else:"},{"line_number":291,"context_line":"            if mname !\u003d self._name:"},{"line_number":292,"context_line":"                raise DiskFileCollision(\u0027Client path does not match path \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F%2BWCA%3D","line":289,"updated":"2013-11-27 05:34:16.000000000","message":"Does this DiskFile class even *have* a _quarantine() method?\n\nAlso, turning this raise into a pass doesn\u0027t make any unit tests fail.","commit_id":"15c31c0373dc8f102320637908c1ed59e854a4df"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"520cc4a48fea1a3189ef6e15256ea27162a3ff69","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        try:"},{"line_number":287,"context_line":"            mname \u003d self._metadata[\u0027name\u0027]"},{"line_number":288,"context_line":"        except KeyError:"},{"line_number":289,"context_line":"            raise self._quarantine(self._name, \"missing name metadata\")"},{"line_number":290,"context_line":"        else:"},{"line_number":291,"context_line":"            if mname !\u003d self._name:"},{"line_number":292,"context_line":"                raise DiskFileCollision(\u0027Client path does not match path \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F%2BV4w%3D","line":289,"in_reply_to":"AAAATn%2F%2BWCA%3D","updated":"2013-11-27 06:10:17.000000000","message":"Nice catch: no, the DiskFile class does not have an _quarantine method.\n\nAgain, using raise here does not change the previous behavior at all, just moves it from the \"fictional\" _quarantine method to here.\n\nI\u0027ll fix the missing _quarantine in another commit.","commit_id":"15c31c0373dc8f102320637908c1ed59e854a4df"}]}
