diff options
-rw-r--r-- | ranger/ext/popen_forked.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ranger/ext/popen_forked.py b/ranger/ext/popen_forked.py index 85c8448b..f10ca1ad 100644 --- a/ranger/ext/popen_forked.py +++ b/ranger/ext/popen_forked.py @@ -4,8 +4,7 @@ from __future__ import (absolute_import, division, print_function) import os -import subprocess - +from subprocess import Popen def Popen_forked(*args, **kwargs): # pylint: disable=invalid-name """Forks process and runs Popen with the given args and kwargs. @@ -21,9 +20,7 @@ def Popen_forked(*args, **kwargs): # pylint: disable=invalid-name with open(os.devnull, 'r') as null_r, open(os.devnull, 'w') as null_w: kwargs['stdin'] = null_r kwargs['stdout'] = kwargs['stderr'] = null_w - with subprocess.Popen(*args, **kwargs): - # Just to enable using with - pass + Popen(*args, **kwargs) # pylint: disable=consider-using-with os._exit(0) # pylint: disable=protected-access else: os.wait() |