diff options
author | toonn <toonn@toonn.io> | 2021-09-01 14:58:29 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-09-01 15:45:45 +0200 |
commit | a504d8987559091c735a9cbf681ce320f7c65325 (patch) | |
tree | f5cc6eca2a2324bc92f22b1166339cc55a160ba6 /ranger | |
parent | 39baa7c9ca2b9d68c9a56c493ce1d53acdabd124 (diff) | |
download | ranger-a504d8987559091c735a9cbf681ce320f7c65325.tar.gz |
bookmarks: Switch to io.open
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/bookmarks.py | 8 |
1 files 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): |