diff options
author | toonn <toonn@toonn.io> | 2021-09-01 14:59:29 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-09-01 15:45:45 +0200 |
commit | 10fc434a03317e6f04e7ffd21f85fa5cafcd905d (patch) | |
tree | 2ac2bc6d989cf140e8e8b2346b288b993733e0ae /ranger | |
parent | a504d8987559091c735a9cbf681ce320f7c65325 (diff) | |
download | ranger-10fc434a03317e6f04e7ffd21f85fa5cafcd905d.tar.gz |
tags: Switch to io.open
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/tags.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/container/tags.py b/ranger/container/tags.py index a8bd50b4..1a751ffc 100644 --- a/ranger/container/tags.py +++ b/ranger/container/tags.py @@ -5,11 +5,11 @@ from __future__ import (absolute_import, division, print_function) -from os.path import exists, abspath, realpath, expanduser, sep import string +from io import open +from os.path import exists, abspath, realpath, expanduser, sep from ranger.core.shared import FileManagerAware -from ranger.ext.open23 import open23 ALLOWED_KEYS = string.ascii_letters + string.digits + string.punctuation @@ -75,7 +75,7 @@ class Tags(FileManagerAware): def sync(self): try: - with open23(self._filename, "r", errors="replace") as fobj: + with open(self._filename, "r", errors="replace") as fobj: self.tags = self._parse(fobj) except (OSError, IOError) as err: if exists(self._filename): @@ -85,7 +85,7 @@ class Tags(FileManagerAware): def dump(self): try: - with open23(self._filename, 'w') as fobj: + with open(self._filename, 'w') as fobj: self._compile(fobj) except OSError as err: self.fm.notify(err, bad=True) |