From ae2ff6185fa4b11a8fbbd8aebfaf1a037b9aa205 Mon Sep 17 00:00:00 2001 From: Jack Wilsdon Date: Sat, 12 Sep 2015 02:09:19 +0100 Subject: [PATCH] Use default stdout and stderr streams for hook processes --- beetsplug/hook.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/beetsplug/hook.py b/beetsplug/hook.py index ed6fa4e93..67595a1b3 100644 --- a/beetsplug/hook.py +++ b/beetsplug/hook.py @@ -50,15 +50,9 @@ def create_hook_function(log, event, command, shell, substitute_args): log.debug('Running command {0} for event {1}', hook_command, event) process = subprocess.Popen(hook_command, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, shell=shell) - while process.poll() is None: - sys.stdout.write(process.stdout.readline()) - - # Ensure there's nothing left in the stream - sys.stdout.write(process.stdout.readline()) + process.wait() return hook_function