Commit fa765202 authored by thomwolf's avatar thomwolf
Browse files

fix file_utils on python 2

parent bcde2c61
...@@ -227,7 +227,7 @@ def get_from_cache(url, cache_dir=None): ...@@ -227,7 +227,7 @@ def get_from_cache(url, cache_dir=None):
meta = {'url': url, 'etag': etag} meta = {'url': url, 'etag': etag}
meta_path = cache_path + '.json' meta_path = cache_path + '.json'
with open(meta_path, 'w', encoding="utf-8") as meta_file: with open(meta_path, 'w', encoding="utf-8") as meta_file:
meta_file.write(json.dumps(meta)) json.dump(meta, meta_file)
logger.info("removing temp file %s", temp_file.name) logger.info("removing temp file %s", temp_file.name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment