)]}'
{"swift/common/memcached.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"b98d082bf25a91b58de36ad20e5d55635667d01c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            if fp:"},{"line_number":101,"context_line":"                fp.close()"},{"line_number":102,"context_line":"                fp \u003d None"},{"line_number":103,"context_line":"        except Exception:"},{"line_number":104,"context_line":"            pass"},{"line_number":105,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F%2BJc%3D","line":102,"updated":"2013-05-15 21:18:28.000000000","message":"What\u0027s this for? fp isn\u0027t used after this point in the function anyway.","commit_id":"26d928f0f53ff1588fec9e7e6f4ebc2ade2913c8"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"00c35a5fee5f9cb380af52c4aa30a879f667790c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            if fp:"},{"line_number":101,"context_line":"                fp.close()"},{"line_number":102,"context_line":"                fp \u003d None"},{"line_number":103,"context_line":"        except Exception:"},{"line_number":104,"context_line":"            pass"},{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            if sock:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F9tw%3D","line":103,"updated":"2013-05-15 23:33:17.000000000","message":"Catch all exception handling functions can hide some pretty funky behaviors. Is there a way to avoid such methodologies?","commit_id":"26d928f0f53ff1588fec9e7e6f4ebc2ade2913c8"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"b98d082bf25a91b58de36ad20e5d55635667d01c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            if sock:"},{"line_number":107,"context_line":"                sock.close()"},{"line_number":108,"context_line":"                sock \u003d None"},{"line_number":109,"context_line":"        except Exception:"},{"line_number":110,"context_line":"            pass"},{"line_number":111,"context_line":"        now \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F%2BJU%3D","line":108,"updated":"2013-05-15 21:18:28.000000000","message":"Same question as above.","commit_id":"26d928f0f53ff1588fec9e7e6f4ebc2ade2913c8"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"e462ed332dd411e5d3d285c71a22d2b6df67886e","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                    sock.connect((host, int(port)))"},{"line_number":149,"context_line":"                    sock.settimeout(self._io_timeout)"},{"line_number":150,"context_line":"                    yield server, sock.makefile(), sock"},{"line_number":151,"context_line":"                except Exception, e:"},{"line_number":152,"context_line":"                    self._exception_occurred(server, e, \u0027connecting\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _return_conn(self, server, fp, sock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F4L0%3D","line":151,"updated":"2013-05-21 05:05:14.000000000","message":"Why do you not pass in fd (ie sock.makefile()) and sock here? If you\u0027ve got an exception, there\u0027s a decent chance at least one of the two values would still be None, but you handle that case in _exception_occurred anyway.\n\nPerhaps I\u0027m missing something obvious, though.","commit_id":"b8f65fc063d0450d3345db48a5493476ac9dbd59"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"51cf97db3046795f3d73ea2ae45a7a34af0356a4","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                    sock.connect((host, int(port)))"},{"line_number":149,"context_line":"                    sock.settimeout(self._io_timeout)"},{"line_number":150,"context_line":"                    yield server, sock.makefile(), sock"},{"line_number":151,"context_line":"                except Exception, e:"},{"line_number":152,"context_line":"                    self._exception_occurred(server, e, \u0027connecting\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _return_conn(self, server, fp, sock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F4H8%3D","line":151,"in_reply_to":"AAAAPH%2F%2F4IY%3D","updated":"2013-05-21 05:39:46.000000000","message":"Ya, certainly not grounds for a -1 from me (yet), but it\u0027s the only place where the parameters aren\u0027t given. Adding them here would allow a socket timeout to be cleaned up (the purpose of the patch), hence my question.","commit_id":"b8f65fc063d0450d3345db48a5493476ac9dbd59"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"116f18d3a44da3f410a74d9447aea84ca6d806ee","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                    sock.connect((host, int(port)))"},{"line_number":149,"context_line":"                    sock.settimeout(self._io_timeout)"},{"line_number":150,"context_line":"                    yield server, sock.makefile(), sock"},{"line_number":151,"context_line":"                except Exception, e:"},{"line_number":152,"context_line":"                    self._exception_occurred(server, e, \u0027connecting\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _return_conn(self, server, fp, sock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F4IY%3D","line":151,"in_reply_to":"AAAAPH%2F%2F4L0%3D","updated":"2013-05-21 05:33:44.000000000","message":"It looks like the intent is to catch errors connecting with that except block, so presumably sock wouldn\u0027t even be anything (None, I guess?).\n\nOTOH, I suppose the settimeout() call could maybe raise something, in which case you\u0027d still want to close the socket?\n\nThe makefile() won\u0027t get called unless it makes it to the yield, in which case the caller\u0027s try/except should catch any exceptions, passing sock and fd into _exception_occurred().","commit_id":"b8f65fc063d0450d3345db48a5493476ac9dbd59"}]}
