about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-08-27 20:00:53 +0200
committertoonn <toonn@toonn.io>2021-08-27 20:00:53 +0200
commitf0ad7a0fe9d371b6ba34ce4aaa725202d8ed5444 (patch)
treeee4d27202167a0bff5c3f8560134061a891d75c6
parentee4b970e6b80920d7468c68b3464468e9c2f54ce (diff)
downloadranger-f0ad7a0fe9d371b6ba34ce4aaa725202d8ed5444.tar.gz
loader: Switch to open23
-rw-r--r--ranger/core/loader.py5
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: