mirror of
https://github.com/beetbox/beets.git
synced 2026-02-25 08:45:01 +01:00
Merge pull request #2524 from beetbox/command-output-close-stdin
Close stdin when performing `command_output()`
This commit is contained in:
commit
68089ac8e9
2 changed files with 11 additions and 0 deletions
|
|
@ -797,10 +797,16 @@ def command_output(cmd, shell=False):
|
|||
"""
|
||||
cmd = convert_command_args(cmd)
|
||||
|
||||
try: # python >= 3.3
|
||||
devnull = subprocess.DEVNULL
|
||||
except AttributeError:
|
||||
devnull = open(os.devnull, 'r+b')
|
||||
|
||||
proc = subprocess.Popen(
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
stdin=devnull,
|
||||
close_fds=platform.system() != 'Windows',
|
||||
shell=shell
|
||||
)
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ New features:
|
|||
* :doc:`/plugins/play`: A new ``-y`` or ``--yes`` parameter lets you skip
|
||||
the warning message if you enqueue more items than the warning threshold
|
||||
usually allows.
|
||||
* Fix a bug where commands which forked subprocesses would sometimes prevent
|
||||
further inputs. This bug mainly affected :doc:`/plugins/convert`.
|
||||
Thanks to :user:`jansol`.
|
||||
:bug:`2488`
|
||||
:bug:`2524`
|
||||
|
||||
Fixes:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue