From 0dff24eb96870de8479ca1b21405311a47fa236b Mon Sep 17 00:00:00 2001 From: Jack Wilsdon Date: Sat, 12 Sep 2015 02:14:33 +0100 Subject: [PATCH] Move Popen call to a single line --- beetsplug/hook.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/beetsplug/hook.py b/beetsplug/hook.py index 67595a1b3..95d330ac1 100644 --- a/beetsplug/hook.py +++ b/beetsplug/hook.py @@ -49,10 +49,7 @@ 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, - shell=shell) - - process.wait() + subprocess.Popen(hook_command, shell=shell).wait() return hook_function