mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
qa/tasks/vstart_runner: add optional "sudo" param to _run_python()
to silence mypy warnings like: tasks/vstart_runner.py:691: error: Definition of "_run_python" in base class "LocalCephFSMount" is incompatible with definition in base class "CephFSMount" tasks/vstart_runner.py:705: error: Definition of "_run_python" in base class "LocalCephFSMount" is incompatible with definition in base class "CephFSMount" Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
975fd8d6f5
commit
0017df2006
@ -659,12 +659,16 @@ class LocalCephFSMount():
|
||||
path = "{0}/client.{1}.*.asok".format(d, self.client_id)
|
||||
return path
|
||||
|
||||
def _run_python(self, pyscript, py_version='python'):
|
||||
def _run_python(self, pyscript, py_version='python', sudo=False):
|
||||
"""
|
||||
Override this to remove the daemon-helper prefix that is used otherwise
|
||||
to make the process killable.
|
||||
"""
|
||||
return self.client_remote.run(args=[py_version, '-c', pyscript],
|
||||
args = []
|
||||
if sudo:
|
||||
args.append('sudo')
|
||||
args += [py_version, '-c', pyscript]
|
||||
return self.client_remote.run(args=args,
|
||||
wait=False, stdout=StringIO())
|
||||
|
||||
def setup_netns(self):
|
||||
|
Loading…
Reference in New Issue
Block a user