def get_device_messages_info(cmd_runner, device): """ Returns info about messages (string) stored on specified SBD device. cmd_runner -- CommandRunner device -- string """ std_out, dummy_std_err, ret_val = cmd_runner.run( [settings.sbd_binary, "-d", device, "list"]) if ret_val != 0: # sbd writes error message into std_out raise LibraryError(reports.sbd_device_list_error(device, std_out)) return std_out
def get_device_messages_info(cmd_runner, device): """ Returns info about messages (string) stored on specified SBD device. cmd_runner -- CommandRunner device -- string """ std_out, dummy_std_err, ret_val = cmd_runner.run( [settings.sbd_binary, "-d", device, "list"] ) if ret_val != 0: # sbd writes error message into std_out raise LibraryError(reports.sbd_device_list_error(device, std_out)) return std_out