Skip to content
Snippets Groups Projects
Commit 06a774a5 authored by Seblu's avatar Seblu
Browse files

RemoteCommand needs to set a non-empty list of remote functions

parent bd6f0ae1
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,8 @@ class Commands(object): ...@@ -31,6 +31,8 @@ class Commands(object):
cobj = self.cmds[cname](self.cli, cname) cobj = self.cmds[cname](self.cli, cname)
if isinstance(cobj, command.RemoteCommand): if isinstance(cobj, command.RemoteCommand):
try: try:
if len(cobj.remote_functions()) == 0:
raise NotImplementedError("No remote function")
if not cobj.remote_functions().issubset(self.functions): if not cobj.remote_functions().issubset(self.functions):
del self.cmds[cname] del self.cmds[cname]
self.cli.printer.debug("Command %s not available"%cname) self.cli.printer.debug("Command %s not available"%cname)
......
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