diff --git a/cccli/command.py b/cccli/command.py index b7f9778c295f45e10da7f7a53e3cbfa042da5edf..acc414f4fce25746c2d656f05f9ed3f4cbb76d80 100644 --- a/cccli/command.py +++ b/cccli/command.py @@ -156,8 +156,12 @@ class Command(object): def cmd_remote(self, argv): '''Show remote command list''' - for cmds in self.cli.rpc.call("list_commands"): - self.printer.out("%s"%cmds["name"]) + try: + for cmds in self.cli.rpc.call("list_commands"): + self.printer.out("%s"%cmds["name"]) + except RpcError as e: + raise cmdError("RPCError: %s"%str(e)) + cmd_remote.usage = "remote" def cmd_history(self, argv):