From a504d8987559091c735a9cbf681ce320f7c65325 Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 1 Sep 2021 14:58:29 +0200 Subject: bookmarks: Switch to io.open --- ranger/container/bookmarks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ranger/container/bookmarks.py b/ranger/container/bookmarks.py index 4407477e..74b478c7 100644 --- a/ranger/container/bookmarks.py +++ b/ranger/container/bookmarks.py @@ -6,9 +6,9 @@ from __future__ import (absolute_import, division, print_function) import string import re import os +from io import open from ranger.core.shared import FileManagerAware -from ranger.ext.open23 import open23 ALLOWED_KEYS = string.ascii_letters + string.digits + "`'" @@ -176,7 +176,7 @@ class Bookmarks(FileManagerAware): path_new = self.path + '.new' try: - with open23(path_new, 'w') as fobj: + with open(path_new, 'w') as fobj: for key, value in self.dct.items(): if isinstance(key, str) and key in ALLOWED_KEYS \ and key not in self.nonpersistent_bookmarks: @@ -218,14 +218,14 @@ class Bookmarks(FileManagerAware): if not os.path.exists(self.path): try: - with open23(self.path, 'w') as fobj: + with open(self.path, 'w') as fobj: pass except OSError as ex: self.fm.notify('Bookmarks error: {0}'.format(str(ex)), bad=True) return None try: - with open23(self.path, 'r') as fobj: + with open(self.path, 'r') as fobj: dct = {} for line in fobj: if self.load_pattern.match(line): -- cgit 1.4.1-2-gfad0