about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-09-01 15:03:59 +0200
committertoonn <toonn@toonn.io>2021-09-01 16:03:48 +0200
commit3001b0d5cf6942863300024944fa2ae6e7f671b3 (patch)
treee8f329178e733690f178472e696f3d3209af3b35
parentbc8e136539f24081647a3e2a24556afcb59d9403 (diff)
downloadranger-3001b0d5cf6942863300024944fa2ae6e7f671b3.tar.gz
console: Switch to io.open
-rw-r--r--ranger/gui/widgets/console.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index a6b90a35..29c13e22 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -9,11 +9,11 @@ import curses
 import os
 import re
 from collections import deque
+from io import open
 
 from ranger import PY3
 from ranger.gui.widgets import Widget
 from ranger.ext.direction import Direction
-from ranger.ext.open23 import open23
 from ranger.ext.widestring import uwid, WideString
 from ranger.container.history import History, HistoryEmptyException
 import ranger
@@ -45,7 +45,7 @@ class Console(Widget):  # pylint: disable=too-many-instance-attributes,too-many-
             self.historypath = self.fm.datapath('history')
             if os.path.exists(self.historypath):
                 try:
-                    with open23(self.historypath, "r") as fobj:
+                    with open(self.historypath, "r") as fobj:
                         try:
                             for line in fobj:
                                 self.history.add(line[:-1])
@@ -80,7 +80,7 @@ class Console(Widget):  # pylint: disable=too-many-instance-attributes,too-many-
             return
         if self.historypath:
             try:
-                with open23(self.historypath, 'w') as fobj:
+                with open(self.historypath, 'w') as fobj:
                     for entry in self.history_backup:
                         try:
                             fobj.write(entry + '\n')