Commit d694803c authored by Seblu's avatar Seblu
Browse files

add command exec

parent 2e73c76f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -543,6 +543,16 @@ class Command(object):
            raise cmdError("RPCError: %s"%str(e))
    cmd_kill.usage = "kill <tql>"

    def cmd_exec(self, argv):
        '''exec a remote command'''
        if len(argv) != 3:
            raise cmdBadArgument()
        try:
            self.cli.rpc.call("exec", argv[1], argv[2])
        except RpcError as e:
            raise cmdError("RPCError: %s"%str(e))
    cmd_exec.usage = "exec <tql> <command>"

class Alias(dict):
    ''' Alias wrapper'''
    def load(self, filename):