Commit 4964773f authored by Seblu's avatar Seblu
Browse files

Fix new list option of rpccall conflict with list option of migrate command

parent 3e88e47d
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ class TqlCommand(RemoteCommand):
        _tql_print: print tql with filter
        _exception: catch or not RPCError exception
        _direct: call directly, no listing before
        _list: list of arg which are added to call arg one by one (=> multiple call)
        _arg_list: list of arg which are added to args one by one (=> multiple call)
        '''

        # set rpccall default option value
@@ -307,7 +307,7 @@ class TqlCommand(RemoteCommand):
                     "tql_index": 1,
                     "tql_print": False,
                     "callback": None,
                     "list": [],
                     "arg_list": [],
                     }
        # check for options modifiers
        for o in _options.keys():
@@ -338,9 +338,9 @@ class TqlCommand(RemoteCommand):
    def _unsecure_rpccall(self, _options, args, kwargs):
        '''Just call an RPC without checking before'''
        try:
            # list mode call command for each argument
            # arg_list mode call command for each argument
            # return is returned as a list
            if len(_options["list"]) == 0:
            if len(_options["arg_list"]) == 0:
                d = self.rpc.call(*args, **kwargs)
                if _options["callback"] is not None:
                    _options["callback"](d)
@@ -348,7 +348,7 @@ class TqlCommand(RemoteCommand):
                    self.print_objects(d, ["output"], index=_options["index"])
            else:
                d = []
                for arg in _options["list"]:
                for arg in _options["arg_list"]:
                    args2 = args + [ arg ]
                    r = self.rpc.call(*args2, **kwargs)
                    d.append(r)
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ class Command_delright(TqlCommand):
        if "*" in self.args[1:]:
            self.rpccall("delright", self.args[0], None)
        else:
            self.rpccall("delright", self.args[0], _list=l)
            self.rpccall("delright", self.args[0], _arg_list=l)

    def remote_functions(self):
        return set(('delright',))