|
|
@ -39,11 +39,7 @@ class Cache:
|
|
|
|
|
|
|
|
|
|
|
|
fn = self._get_cache_fn(section, key, dtype)
|
|
|
|
fn = self._get_cache_fn(section, key, dtype)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
os.makedirs(os.path.dirname(fn), exist_ok=True)
|
|
|
|
os.makedirs(os.path.dirname(fn))
|
|
|
|
|
|
|
|
except OSError as ose:
|
|
|
|
|
|
|
|
if ose.errno != errno.EEXIST:
|
|
|
|
|
|
|
|
raise
|
|
|
|
|
|
|
|
self._ydl.write_debug(f'Saving {section}.{key} to cache')
|
|
|
|
self._ydl.write_debug(f'Saving {section}.{key} to cache')
|
|
|
|
write_json_file({'yt-dlp_version': __version__, 'data': data}, fn)
|
|
|
|
write_json_file({'yt-dlp_version': __version__, 'data': data}, fn)
|
|
|
|
except Exception:
|
|
|
|
except Exception:
|
|
|
|