From: Rishabh Dave Date: Wed, 24 Feb 2021 19:49:49 +0000 (+0530) Subject: qa/ceph_manager: make raw_cluster_cmd() keywords args compatible X-Git-Tag: v17.1.0~2709^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1a0608b50a99a99de8bf5e0a7f79b72df9c9768;p=ceph.git qa/ceph_manager: make raw_cluster_cmd() keywords args compatible In CephManager.raw_cluster_cmd(), pass only kwargs to run_cluster_cmd() instead of both args and kwargs since passing both will lead to "TypeError: got multiple values". Fixes: https://tracker.ceph.com/issues/49495 Signed-off-by: Rishabh Dave --- diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index f28565ef1cbf..66cbd19f578a 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -1362,9 +1362,10 @@ class CephManager: """ Start ceph on a raw cluster. Return count """ - stdout = kwargs.pop('stdout', StringIO()) - p = self.run_cluster_cmd(args=args, stdout=stdout, **kwargs) - return p.stdout.getvalue() + if kwargs.get('args') is None and args: + kwargs['args'] = args + kwargs['stdout'] = kwargs.pop('stdout', StringIO()) + return self.run_cluster_cmd(**kwargs).stdout.getvalue() def raw_cluster_cmd_result(self, *args, **kwargs): """