From 91eabb820d5a10fb1e0deda278e91980f067eb05 Mon Sep 17 00:00:00 2001
From: Seblu <sebastien.luttringer@smartjog.com>
Date: Mon, 10 Jan 2011 16:08:17 +0100
Subject: [PATCH] catch exception in command remote

---
 cccli/command.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cccli/command.py b/cccli/command.py
index b7f9778..acc414f 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):
-- 
GitLab