aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/cache.py')
-rw-r--r--youtube_dl/cache.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/cache.py b/youtube_dl/cache.py
index 4822439d0..54123da0e 100644
--- a/youtube_dl/cache.py
+++ b/youtube_dl/cache.py
@@ -1,14 +1,16 @@
from __future__ import unicode_literals
import errno
-import io
import json
import os
import re
import shutil
import traceback
-from .compat import compat_getenv
+from .compat import (
+ compat_getenv,
+ compat_open as open,
+)
from .utils import (
error_to_compat_str,
expand_path,
@@ -83,7 +85,7 @@ class Cache(object):
cache_fn = self._get_cache_fn(section, key, dtype)
try:
try:
- with io.open(cache_fn, 'r', encoding='utf-8') as cachef:
+ with open(cache_fn, 'r', encoding='utf-8') as cachef:
return self._validate(json.load(cachef), min_ver)
except ValueError:
try: