about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-09-01 15:01:38 +0200
committertoonn <toonn@toonn.io>2021-09-01 16:03:48 +0200
commit9a76f49120f5ba32558313e73098fcafd490b211 (patch)
tree76245d74c8a6538ce9d7ace80c31fd22c1ff090f /ranger
parenta84d909b80240d5a0e40cae5c6e433b428589ed6 (diff)
downloadranger-9a76f49120f5ba32558313e73098fcafd490b211.tar.gz
metadata: Switch to io.open
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/metadata.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/core/metadata.py b/ranger/core/metadata.py
index 833d6e3e..2c5165da 100644
--- a/ranger/core/metadata.py
+++ b/ranger/core/metadata.py
@@ -14,8 +14,9 @@ The database is contained in a local .metadata.json file.
 from __future__ import (absolute_import, division, print_function)
 
 import copy
+from io import open
 from os.path import join, dirname, exists, basename
-from ranger.ext.open23 import open23
+
 from ranger.ext.openstruct import DefaultOpenStruct as ostruct
 
 
@@ -85,7 +86,7 @@ class MetadataManager(object):
         self.metadata_cache[filename] = entry
         self.metafile_cache[metafile] = entries
 
-        with open23(metafile, "w") as fobj:
+        with open(metafile, "w") as fobj:
             json.dump(entries, fobj, check_circular=True, indent=2)
 
     def _get_entry(self, filename):
@@ -118,7 +119,7 @@ class MetadataManager(object):
             return self.metafile_cache[metafile]
 
         if exists(metafile):
-            with open23(metafile, "r") as fobj:
+            with open(metafile, "r") as fobj:
                 try:
                     entries = json.load(fobj)
                 except ValueError: