scripts/scylla_util.py: introduce back user/group arguments for out()
since #10467 remove the user/group parameters needed for the housekeeping call, need to introuce them back Fixes: #10804 Closes #10818
This commit is contained in:
committed by
Avi Kivity
parent
d606966597
commit
d2ca2455db
4
dist/common/scripts/scylla_util.py
vendored
4
dist/common/scripts/scylla_util.py
vendored
@@ -38,8 +38,8 @@ def scylla_excepthook(etype, value, tb):
|
||||
sys.excepthook = scylla_excepthook
|
||||
|
||||
|
||||
def out(cmd, shell=True, timeout=None, encoding='utf-8', ignore_error=False):
|
||||
res = subprocess.run(cmd, capture_output=True, shell=shell, timeout=timeout, check=False, encoding=encoding)
|
||||
def out(cmd, shell=True, timeout=None, encoding='utf-8', ignore_error=False, user=None, group=None):
|
||||
res = subprocess.run(cmd, capture_output=True, shell=shell, timeout=timeout, check=False, encoding=encoding, user=user, group=group)
|
||||
if not ignore_error and res.returncode != 0:
|
||||
print(f'Command \'{cmd}\' returned non-zero exit status: {res.returncode}')
|
||||
print('---------- stdout ----------')
|
||||
|
||||
Reference in New Issue
Block a user