)]}'
{"glance/store/swift.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"2a1356782ae12929f828d6ea66637743cb40df7f","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                                                  reason\u003dreason)"},{"line_number":278,"context_line":"        return result"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @staticmethod"},{"line_number":281,"context_line":"    def _delete_stale_chunks(connection, container, chunk_list):"},{"line_number":282,"context_line":"        for chunk in chunk_list:"},{"line_number":283,"context_line":"            LOG.debug(_(\"Deleting chunk %s\" % chunk))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F5rw%3D","line":280,"updated":"2013-03-21 17:06:48.000000000","message":"Hey,\n\nwhy does it have to be static if it\u0027s \"private\"?","commit_id":"def70b51549b1daa2dad647456c5e56ac9b61091"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"7e18de44ecf4a5eb328ff9b284e8b90ee037b74c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                                                  reason\u003dreason)"},{"line_number":278,"context_line":"        return result"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @staticmethod"},{"line_number":281,"context_line":"    def _delete_stale_chunks(connection, container, chunk_list):"},{"line_number":282,"context_line":"        for chunk in chunk_list:"},{"line_number":283,"context_line":"            LOG.debug(_(\"Deleting chunk %s\" % chunk))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F5pE%3D","line":280,"in_reply_to":"AAAAOH%2F%2F5rw%3D","updated":"2013-03-21 17:20:59.000000000","message":"Fair point, let me change that.","commit_id":"def70b51549b1daa2dad647456c5e56ac9b61091"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"2a1356782ae12929f828d6ea66637743cb40df7f","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                            location.container, chunk_name, reader,"},{"line_number":341,"context_line":"                            content_length\u003dcontent_length)"},{"line_number":342,"context_line":"                        written_chunks.append(chunk_name)"},{"line_number":343,"context_line":"                    except Exception:"},{"line_number":344,"context_line":"                        try:"},{"line_number":345,"context_line":"                            raise"},{"line_number":346,"context_line":"                        finally:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F5rg%3D","line":343,"updated":"2013-03-21 17:06:48.000000000","message":"hey,\n\ncouldn\u0027t this just be (finally block is always executed, no matter what):\n\ntry:\n    ......\nfinally:\n    self._delete_stale_chunks","commit_id":"def70b51549b1daa2dad647456c5e56ac9b61091"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"5b022acd377e9bc6c7abc9ff0f146430693abf73","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                            location.container, chunk_name, reader,"},{"line_number":341,"context_line":"                            content_length\u003dcontent_length)"},{"line_number":342,"context_line":"                        written_chunks.append(chunk_name)"},{"line_number":343,"context_line":"                    except Exception:"},{"line_number":344,"context_line":"                        try:"},{"line_number":345,"context_line":"                            raise"},{"line_number":346,"context_line":"                        finally:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F5P4%3D","line":343,"in_reply_to":"AAAAOH%2F%2F5pM%3D","updated":"2013-03-21 20:49:49.000000000","message":"T_T gosh, you\u0027re right! nevermind! :P","commit_id":"def70b51549b1daa2dad647456c5e56ac9b61091"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"7e18de44ecf4a5eb328ff9b284e8b90ee037b74c","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                            location.container, chunk_name, reader,"},{"line_number":341,"context_line":"                            content_length\u003dcontent_length)"},{"line_number":342,"context_line":"                        written_chunks.append(chunk_name)"},{"line_number":343,"context_line":"                    except Exception:"},{"line_number":344,"context_line":"                        try:"},{"line_number":345,"context_line":"                            raise"},{"line_number":346,"context_line":"                        finally:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F5pM%3D","line":343,"in_reply_to":"AAAAOH%2F%2F5rg%3D","updated":"2013-03-21 17:20:59.000000000","message":"Hi Flavio,\n\nDo you mean have finally at the same indentation level as the try and except above (which wrap the put_object calls)? If so I think that would delete your image data even if no exception occurred.","commit_id":"def70b51549b1daa2dad647456c5e56ac9b61091"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"c874300b29b3b7c8c70dc8269a8e26479cccaa1b","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                        written_chunks.append(chunk_name)"},{"line_number":342,"context_line":"                    except Exception:"},{"line_number":343,"context_line":"                        try:"},{"line_number":344,"context_line":"                            raise"},{"line_number":345,"context_line":"                        finally:"},{"line_number":346,"context_line":"                            # Delete orphaned segments from swift backend"},{"line_number":347,"context_line":"                            self._delete_stale_chunks(connection,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F5Fw%3D","line":344,"updated":"2013-03-21 21:56:45.000000000","message":"This seems a bit more confusing to me than explicitly saving the exception. Is there a reason to prefer it over using sys?","commit_id":"63cede84a28efe845d9da79fb336a36eb2e96785"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"4938ab5ebbfb576da952d97335913884c99aaa83","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                        written_chunks.append(chunk_name)"},{"line_number":342,"context_line":"                    except Exception:"},{"line_number":343,"context_line":"                        try:"},{"line_number":344,"context_line":"                            raise"},{"line_number":345,"context_line":"                        finally:"},{"line_number":346,"context_line":"                            # Delete orphaned segments from swift backend"},{"line_number":347,"context_line":"                            self._delete_stale_chunks(connection,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F4bo%3D","line":344,"in_reply_to":"AAAAOH%2F%2F5Fw%3D","updated":"2013-03-22 10:19:36.000000000","message":"Hi Mark. I took the approach from Doug Hellman\u0027s \u0027Python Exception Handling Techniques\u0027 so assumed it was best practice. (http://doughellmann.com/2009/06/python-exception-handling-techniques.html) Digging a little deeper it seems that by virtue of putting the cleanup in a separate function we can just \u0027raise\u0027 after calling the cleanup. Let me push that change up and see what you think. This is mainly cosmetic so if you want to stick with the current approach that\u0027s fine.","commit_id":"63cede84a28efe845d9da79fb336a36eb2e96785"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"65af23d3da17d9c150c6e0e05a189c7adbda7976","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                        self._delete_stale_chunks(connection,"},{"line_number":345,"context_line":"                                                  location.container,"},{"line_number":346,"context_line":"                                                  written_chunks)"},{"line_number":347,"context_line":"                        raise"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"                    bytes_read \u003d reader.bytes_read"},{"line_number":350,"context_line":"                    msg \u003d _(\"Wrote chunk %(chunk_name)s (%(chunk_id)d/\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2F%2FTk%3D","line":347,"updated":"2013-04-09 00:04:04.000000000","message":"I just gave this a shot in an interpreter and it did not raise the original exception when the _delete_stale_chunks would have erred.\n\nnot sure which method of reraising I prefer.","commit_id":"209549680dd3dcb78b6f6016b37867410cdc17cf"}]}
