check_output will be best here I believe

This commit is contained in:
Stefan Midjich 2017-11-16 20:48:05 +01:00
parent f821b1df5c
commit 07f68b91b5
1 changed files with 2 additions and 3 deletions

View File

@ -17,10 +17,9 @@ def run_ipset(command, *args, **kw):
args=' '.join(args) args=' '.join(args)
) )
proc = subprocess.call( output = subprocess.check_output(
shlex.split(full_command), shlex.split(full_command),
stdout=subprocess.PIPE,
timeout=timeout timeout=timeout
) )
return proc return output