Commit 9fd7f219 authored by Vitaliy Mysak's avatar Vitaliy Mysak Committed by Darek Stojaczyk
Browse files

spdkcli: handle BrokenPipeError



Catch BrokenPipeError to display meaningful error message.

Withouth this change, user gets stacktrace
  when e.g. SPDK application was closed.

Change-Id: Ia7d8edb92a70b4c4b9e71a7d4ce38e265769936a
Signed-off-by: default avatarVitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461571


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 9375616a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -74,6 +74,9 @@ def main():
                spdk_shell.run_interactive()
            except (JSONRPCException, ExecutionError) as e:
                spdk_shell.log.error("%s" % e)
            except BrokenPipeError as e:
                spdk_shell.log.error("Lost connection with SPDK: %s" % e)
                break


if __name__ == "__main__":