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:06 +0200
committertoonn <toonn@toonn.io>2021-09-01 16:03:48 +0200
commit555201fc86896724746a06b68b61b6715890693d (patch)
tree50a36d0e082f43caa30e96f45cf0dca756859e86 /ranger
parent10fc434a03317e6f04e7ffd21f85fa5cafcd905d (diff)
downloadranger-555201fc86896724746a06b68b61b6715890693d.tar.gz
fm: Switch to io.open
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/fm.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index a9d5df7e..65a44f04 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -5,14 +5,15 @@
 
 from __future__ import (absolute_import, division, print_function)
 
-from time import time
-from collections import deque
 import mimetypes
 import os.path
 import pwd
 import socket
 import stat
 import sys
+from collections import deque
+from io import open
+from time import time
 
 import ranger.api
 from ranger.container import settings
@@ -26,7 +27,6 @@ from ranger.core.runner import Runner
 from ranger.core.tab import Tab
 from ranger.ext import logutils
 from ranger.ext.img_display import get_image_displayer
-from ranger.ext.open23 import open23
 from ranger.ext.rifle import Rifle
 from ranger.ext.signals import SignalDispatcher
 from ranger.gui.ui import UI
@@ -441,14 +441,14 @@ class FM(Actions,  # pylint: disable=too-many-instance-attributes
             if ranger.args.choosedir and self.thisdir and self.thisdir.path:
                 # XXX: UnicodeEncodeError: 'utf-8' codec can't encode character
                 # '\udcf6' in position 42: surrogates not allowed
-                with open23(ranger.args.choosedir, 'w') as fobj:
+                with open(ranger.args.choosedir, 'w') as fobj:
                     fobj.write(self.thisdir.path)
             self.bookmarks.remember(self.thisdir)
             self.bookmarks.save()
 
             # Save tabs
             if not ranger.args.clean and self.settings.save_tabs_on_exit and len(self.tabs) > 1:
-                with open23(self.datapath('tabs'), 'a') as fobj:
+                with open(self.datapath('tabs'), 'a') as fobj:
                     # Don't save active tab since launching ranger changes the active tab
                     fobj.write('\0'.join(v.path for t, v in self.tabs.items())
                                + '\0\0')