)]}'
{"cinder/volume/drivers/san/san.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"5fe68c23b5c46e57c091d51e5a144dfba602296d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"The unique thing about a SAN is that we don\u0027t expect that we can run the volume"},{"line_number":21,"context_line":"controller on the SAN hardware.  We expect to access it over SSH or some API."},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import paramiko"},{"line_number":25,"context_line":"import random"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FZTM%3D","line":23,"updated":"2013-01-24 06:32:37.000000000","message":"paramiko still being imported","commit_id":"ddbfa3dfc26cf0fb66c0cad023a8598aa8d0c66d"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"100fc8a5b4bc797d741a30797287a35314d5834f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"The unique thing about a SAN is that we don\u0027t expect that we can run the volume"},{"line_number":21,"context_line":"controller on the SAN hardware.  We expect to access it over SSH or some API."},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import paramiko"},{"line_number":25,"context_line":"import random"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FZPo%3D","line":23,"in_reply_to":"AAAAM3%2F%2FZTM%3D","updated":"2013-01-24 07:31:44.000000000","message":"Yes, paramiko is still imported here - what I didn\u0027t like is that the caller of _run_ssh has to import paramiko just for the exception.","commit_id":"ddbfa3dfc26cf0fb66c0cad023a8598aa8d0c66d"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"5fe68c23b5c46e57c091d51e5a144dfba602296d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                            check_exit_code\u003dcheck_exit_code)"},{"line_number":124,"context_line":"                    except Exception as e:"},{"line_number":125,"context_line":"                        LOG.error(e)"},{"line_number":126,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":127,"context_line":"                raise exception.SSHExecFailed(attempts\u003dtotal_attempts,"},{"line_number":128,"context_line":"                                              cmd\u003dcommand)"},{"line_number":129,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FZS4%3D","line":126,"updated":"2013-01-24 06:32:37.000000000","message":"So usually I would just say just raise ProcessExecutionError like we do with utils.ssh_execute, but it seems like we can get away without creating another exception class that\u0027s only be used in this one spot?","commit_id":"ddbfa3dfc26cf0fb66c0cad023a8598aa8d0c66d"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"100fc8a5b4bc797d741a30797287a35314d5834f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                            check_exit_code\u003dcheck_exit_code)"},{"line_number":124,"context_line":"                    except Exception as e:"},{"line_number":125,"context_line":"                        LOG.error(e)"},{"line_number":126,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":127,"context_line":"                raise exception.SSHExecFailed(attempts\u003dtotal_attempts,"},{"line_number":128,"context_line":"                                              cmd\u003dcommand)"},{"line_number":129,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FZPg%3D","line":126,"in_reply_to":"AAAAM3%2F%2FZS4%3D","updated":"2013-01-24 07:31:44.000000000","message":"I now agree with you, and moreover, I want the error code from the last call that failed.  The code is  running SSH commands that fail without knowing why, and can\u0027t act accordingly.","commit_id":"ddbfa3dfc26cf0fb66c0cad023a8598aa8d0c66d"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"322c7a8ee5ff603d4f318de75ae2571449d3d008","unresolved":false,"context_lines":[{"line_number":21,"context_line":"controller on the SAN hardware.  We expect to access it over SSH or some API."},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import paramiko"},{"line_number":25,"context_line":"import random"},{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FXoo%3D","line":24,"updated":"2013-01-25 04:44:09.000000000","message":"To be more clear, after you removed the exception, nothing else is using this import reference.","commit_id":"043069af5e877092dbea7ccb86d235396f3e8b6a"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"ac9cff17b28ce411139814e8282cb8ae68bcb88f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"controller on the SAN hardware.  We expect to access it over SSH or some API."},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import paramiko"},{"line_number":25,"context_line":"import random"},{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FWBk%3D","line":24,"in_reply_to":"AAAAM3%2F%2FXoo%3D","updated":"2013-01-28 05:47:15.000000000","message":"Done","commit_id":"043069af5e877092dbea7ccb86d235396f3e8b6a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"322c7a8ee5ff603d4f318de75ae2571449d3d008","unresolved":false,"context_lines":[{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import paramiko"},{"line_number":25,"context_line":"import random"},{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from eventlet import greenthread"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FXok%3D","line":25,"updated":"2013-01-25 04:44:09.000000000","message":"nothing is using sys.","commit_id":"043069af5e877092dbea7ccb86d235396f3e8b6a"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"ac9cff17b28ce411139814e8282cb8ae68bcb88f","unresolved":false,"context_lines":[{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import paramiko"},{"line_number":25,"context_line":"import random"},{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from eventlet import greenthread"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FWBg%3D","line":25,"in_reply_to":"AAAAM3%2F%2FXok%3D","updated":"2013-01-28 05:47:15.000000000","message":"Done","commit_id":"043069af5e877092dbea7ccb86d235396f3e8b6a"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"97dfc2bab1ada5482ac1781f8606c0407406b681","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        last_exception \u003d e"},{"line_number":127,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":128,"context_line":"                if isinstance(last_exception, exception.ProcessExecutionError):"},{"line_number":129,"context_line":"                    raise exception.ProcessExecutionError("},{"line_number":130,"context_line":"                            exit_code\u003dlast_exception.exit_code,"},{"line_number":131,"context_line":"                            stdout\u003dlast_exception.stdout,"},{"line_number":132,"context_line":"                            stderr\u003dlast_exception.stderr,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FUDk%3D","line":129,"updated":"2013-01-29 12:59:48.000000000","message":"what\u0027s the difference between this and just \u0027raise last_exception\u0027 ? Also, why not use a try/except block instead of the isinstance call?","commit_id":"3c0ea83a898554f4f9f36c7b21cd3e33910a3001"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"569543f6bc6d9df15d9d2e5a0897f39a07f981d5","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        last_exception \u003d e"},{"line_number":127,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":128,"context_line":"                if isinstance(last_exception, exception.ProcessExecutionError):"},{"line_number":129,"context_line":"                    raise exception.ProcessExecutionError("},{"line_number":130,"context_line":"                            exit_code\u003dlast_exception.exit_code,"},{"line_number":131,"context_line":"                            stdout\u003dlast_exception.stdout,"},{"line_number":132,"context_line":"                            stderr\u003dlast_exception.stderr,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FHa0%3D","line":129,"in_reply_to":"AAAAM3%2F%2FQL0%3D","updated":"2013-02-06 18:27:06.000000000","message":"Done.  Thanks!","commit_id":"3c0ea83a898554f4f9f36c7b21cd3e33910a3001"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"1cc0dcf0013859df043b1f3bbc5f973c2742fb73","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        last_exception \u003d e"},{"line_number":127,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":128,"context_line":"                if isinstance(last_exception, exception.ProcessExecutionError):"},{"line_number":129,"context_line":"                    raise exception.ProcessExecutionError("},{"line_number":130,"context_line":"                            exit_code\u003dlast_exception.exit_code,"},{"line_number":131,"context_line":"                            stdout\u003dlast_exception.stdout,"},{"line_number":132,"context_line":"                            stderr\u003dlast_exception.stderr,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FQL0%3D","line":129,"in_reply_to":"AAAAM3%2F%2FTwo%3D","updated":"2013-01-31 09:34:05.000000000","message":"Well it\u0027s just another way to implement it. You could do something like this:\n\ntry:\n  # your first branch as is now\n  raise exception.ProcessExecutionError(exit_code\u003dlast_exception.exit_code ...)\nexcept AttributeError: # gets raised when last exception does not have one of the required attributes for ProcessExecutionError\n  # your second branch as is now\n  raise exception.ProcessExecutionError(exit_code\u003d-1, stdout\u003d\"\" ...)\n\nI slightly prefer this version. Also see http://www.canonical.org/~kragen/isinstance/","commit_id":"3c0ea83a898554f4f9f36c7b21cd3e33910a3001"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"cc341c7cfeb778e99ecbf23e98cf7a1209ff6fde","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        last_exception \u003d e"},{"line_number":127,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":128,"context_line":"                if isinstance(last_exception, exception.ProcessExecutionError):"},{"line_number":129,"context_line":"                    raise exception.ProcessExecutionError("},{"line_number":130,"context_line":"                            exit_code\u003dlast_exception.exit_code,"},{"line_number":131,"context_line":"                            stdout\u003dlast_exception.stdout,"},{"line_number":132,"context_line":"                            stderr\u003dlast_exception.stderr,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FTwo%3D","line":129,"in_reply_to":"AAAAM3%2F%2FUDk%3D","updated":"2013-01-30 17:27:26.000000000","message":"The first question I get, and good point.  I don\u0027t see what you mean by the second question.","commit_id":"3c0ea83a898554f4f9f36c7b21cd3e33910a3001"}]}
