about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-09-01 15:00:21 +0200
committertoonn <toonn@toonn.io>2021-09-01 16:03:48 +0200
commit334ed60a4ab56cf027e5a45d5c465f88c8e5a78d (patch)
tree394523d52987a19658a68434a1ceced12f4ab549 /ranger
parent555201fc86896724746a06b68b61b6715890693d (diff)
downloadranger-334ed60a4ab56cf027e5a45d5c465f88c8e5a78d.tar.gz
loader: Switch to io.open
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/loader.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py
index 1ecfb2eb..99e60abf 100644
--- a/ranger/core/loader.py
+++ b/ranger/core/loader.py
@@ -3,13 +3,14 @@
 
 from __future__ import (absolute_import, division, print_function)
 
-from collections import deque
-from subprocess import Popen, PIPE
-from time import time, sleep
+import errno
 import math
 import os.path
 import select
-import errno
+from collections import deque
+from io import open
+from subprocess import Popen, PIPE
+from time import time, sleep
 
 try:
     import chardet  # pylint: disable=import-error
@@ -20,7 +21,6 @@ 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
 
@@ -178,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 open23(os.devnull, 'r')
+        popenargs['stdin'] = PIPE if self.input else open(os.devnull, 'r')
         self.process = process = Popen(self.args, **popenargs)
         self.signal_emit('before', process=process, loader=self)
         if self.input: