[modules/deadbeef] Update to latest API
This commit is contained in:
parent
06f229a339
commit
289a4bad41
2 changed files with 33 additions and 37 deletions
|
@ -3,11 +3,11 @@ import shlex
|
|||
import subprocess
|
||||
import logging
|
||||
|
||||
def execute(cmd, wait=True, ignore_errors=False, env=None):
|
||||
def execute(cmd, wait=True, ignore_errors=False, include_stderr=False, env=None):
|
||||
args = shlex.split(cmd)
|
||||
logging.debug(cmd)
|
||||
try:
|
||||
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
|
||||
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT if include_stderr else subprocess.PIPE, env=env)
|
||||
except FileNotFoundError as e:
|
||||
raise RuntimeError('{} not found'.format(cmd))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue