diff options
author | toonn <toonn@toonn.io> | 2021-08-27 20:00:53 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-08-27 20:00:53 +0200 |
commit | f0ad7a0fe9d371b6ba34ce4aaa725202d8ed5444 (patch) | |
tree | ee4d27202167a0bff5c3f8560134061a891d75c6 | |
parent | ee4b970e6b80920d7468c68b3464468e9c2f54ce (diff) | |
download | ranger-f0ad7a0fe9d371b6ba34ce4aaa725202d8ed5444.tar.gz |
loader: Switch to open23
-rw-r--r-- | ranger/core/loader.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py index ec94b049..1ecfb2eb 100644 --- a/ranger/core/loader.py +++ b/ranger/core/loader.py @@ -19,9 +19,10 @@ except ImportError: from ranger import PY3 from ranger.core.shared import FileManagerAware +from ranger.ext.human_readable import human_readable +from ranger.ext.open23 import open23 from ranger.ext.safe_path import get_safe_path from ranger.ext.signals import SignalDispatcher -from ranger.ext.human_readable import human_readable class Loadable(object): @@ -177,7 +178,7 @@ class CommandLoader( # pylint: disable=too-many-instance-attributes # pylint: disable=consider-using-with popenargs = {} if self.popenArgs is None else self.popenArgs popenargs['stdout'] = popenargs['stderr'] = PIPE - popenargs['stdin'] = PIPE if self.input else open(os.devnull, 'r') + popenargs['stdin'] = PIPE if self.input else open23(os.devnull, 'r') self.process = process = Popen(self.args, **popenargs) self.signal_emit('before', process=process, loader=self) if self.input: |