Skip to content
Snippets Groups Projects
Commit 7aace5d2 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

nvmetcli: improve error reporting


Report a nice error message in red instead of a python backtrace.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 6978cd14
No related branches found
No related tags found
No related merge requests found
......@@ -229,13 +229,17 @@ def main():
funcs[sys.argv[1]](savefile)
return
shell = configshell.shell.ConfigShell('~/.nvmetcli')
UIRootNode(shell)
try:
shell = configshell.shell.ConfigShell('~/.nvmetcli')
UIRootNode(shell)
except Exception as msg:
shell.log.error(str(msg))
return
while not shell._exit:
try:
shell.run_interactive()
except configshell.ExecutionError as msg:
except Exception as msg:
shell.log.error(str(msg))
if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment