From 3001b0d5cf6942863300024944fa2ae6e7f671b3 Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 1 Sep 2021 15:03:59 +0200 Subject: console: Switch to io.open --- ranger/gui/widgets/console.py | 6 +++--- 1 file 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') -- cgit 1.4.1-2-gfad0