)]}'
{"cinder/volume/manager.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"22787eeeb3adaf7724ad8d0cc8abf72999343480","unresolved":false,"context_lines":[{"line_number":2920,"context_line":"                                self.driver.create_volume_from_snapshot("},{"line_number":2921,"context_line":"                                    vol, snapshot))"},{"line_number":2922,"context_line":"                            if driver_update:"},{"line_number":2923,"context_line":"                                driver_update.pop(\u0027id\u0027, None)"},{"line_number":2924,"context_line":"                                vol_model_update.update(driver_update)"},{"line_number":2925,"context_line":"                            if \u0027status\u0027 not in vol_model_update:"},{"line_number":2926,"context_line":"                                vol_model_update[\u0027status\u0027] \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_06aeb880","line":2923,"updated":"2017-03-21 20:15:23.000000000","message":"No need for \", None\" here.","commit_id":"bac35336109c2c71cf5faef729a227168d57e216"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d23eadc89f954d5be3d6681dd1a37b1f7dd9b879","unresolved":false,"context_lines":[{"line_number":2920,"context_line":"                                self.driver.create_volume_from_snapshot("},{"line_number":2921,"context_line":"                                    vol, snapshot))"},{"line_number":2922,"context_line":"                            if driver_update:"},{"line_number":2923,"context_line":"                                driver_update.pop(\u0027id\u0027, None)"},{"line_number":2924,"context_line":"                                vol_model_update.update(driver_update)"},{"line_number":2925,"context_line":"                            if \u0027status\u0027 not in vol_model_update:"},{"line_number":2926,"context_line":"                                vol_model_update[\u0027status\u0027] \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_cfa74cbb","line":2923,"in_reply_to":"1a1ced50_06aeb880","updated":"2017-03-22 01:12:46.000000000","message":"Hi Eric,\n\nThanks for reviewing.\n\nI tried removing \", None\" but got KeyError:\n\n\u003e\u003e\u003e t \u003d {\u0027a\u0027: 1, \u0027b\u0027: 2}\n\u003e\u003e\u003e t.pop(\u0027non-existing\u0027)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nKeyError: \u0027non-existing\u0027\n\nI checked the docs.  It looks like in 2.3 and later, KeyError will be raised if default is not given to an non-existing key.\n\nhttps://docs.python.org/2/library/stdtypes.html#dict.pop\nhttps://docs.python.org/3/library/stdtypes.html#dict.pop\nIf default is not given and key is not in the dictionary, a KeyError is raised. In version 2.3 and later.","commit_id":"bac35336109c2c71cf5faef729a227168d57e216"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7ff16b677981348d8ba184c470e639645913b75e","unresolved":false,"context_lines":[{"line_number":2920,"context_line":"                                self.driver.create_volume_from_snapshot("},{"line_number":2921,"context_line":"                                    vol, snapshot))"},{"line_number":2922,"context_line":"                            if driver_update:"},{"line_number":2923,"context_line":"                                driver_update.pop(\u0027id\u0027, None)"},{"line_number":2924,"context_line":"                                vol_model_update.update(driver_update)"},{"line_number":2925,"context_line":"                            if \u0027status\u0027 not in vol_model_update:"},{"line_number":2926,"context_line":"                                vol_model_update[\u0027status\u0027] \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_0a2312a8","line":2923,"in_reply_to":"1a1ced50_cfa74cbb","updated":"2017-03-22 01:34:24.000000000","message":"The other option would be to check for the key first, but this seems the better option.","commit_id":"bac35336109c2c71cf5faef729a227168d57e216"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"22787eeeb3adaf7724ad8d0cc8abf72999343480","unresolved":false,"context_lines":[{"line_number":2937,"context_line":"                            driver_update \u003d self.driver.create_cloned_volume("},{"line_number":2938,"context_line":"                                vol, source_vol)"},{"line_number":2939,"context_line":"                            if driver_update:"},{"line_number":2940,"context_line":"                                driver_update.pop(\u0027id\u0027, None)"},{"line_number":2941,"context_line":"                                vol_model_update.update(driver_update)"},{"line_number":2942,"context_line":"                            if \u0027status\u0027 not in vol_model_update:"},{"line_number":2943,"context_line":"                                vol_model_update[\u0027status\u0027] \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_26b3b4ea","line":2940,"updated":"2017-03-21 20:15:23.000000000","message":"No need for \", None\" here.","commit_id":"bac35336109c2c71cf5faef729a227168d57e216"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"22787eeeb3adaf7724ad8d0cc8abf72999343480","unresolved":false,"context_lines":[{"line_number":3922,"context_line":"            try:"},{"line_number":3923,"context_line":"                driver_update \u003d self.driver.create_snapshot(snapshot)"},{"line_number":3924,"context_line":"                if driver_update:"},{"line_number":3925,"context_line":"                    driver_update.pop(\u0027id\u0027, None)"},{"line_number":3926,"context_line":"                    snapshot_model_update.update(driver_update)"},{"line_number":3927,"context_line":"                if \u0027status\u0027 not in snapshot_model_update:"},{"line_number":3928,"context_line":"                    snapshot_model_update[\u0027status\u0027] \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_c6de6010","line":3925,"updated":"2017-03-21 20:15:23.000000000","message":"No need for \", None\" here.","commit_id":"bac35336109c2c71cf5faef729a227168d57e216"}]}
