From 06a774a50f066e375243b79c2d0963a0e3acaabe Mon Sep 17 00:00:00 2001
From: Seblu <sebastien.luttringer@smartjog.com>
Date: Mon, 16 May 2011 12:01:24 +0200
Subject: [PATCH] RemoteCommand needs to set a non-empty list of remote
 functions

---
 cccli/commands.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cccli/commands.py b/cccli/commands.py
index 56631ad..c912175 100644
--- a/cccli/commands.py
+++ b/cccli/commands.py
@@ -31,6 +31,8 @@ class Commands(object):
             cobj = self.cmds[cname](self.cli, cname)
             if isinstance(cobj, command.RemoteCommand):
                 try:
+                    if len(cobj.remote_functions()) == 0:
+                        raise NotImplementedError("No remote function")
                     if not cobj.remote_functions().issubset(self.functions):
                         del self.cmds[cname]
                         self.cli.printer.debug("Command %s not available"%cname)
-- 
GitLab