fix file_utils on python 2

This commit is contained in:
thomwolf 2019-04-17 13:32:22 +02:00
parent bcde2c61cb
commit fa76520240

View File

@ -227,7 +227,7 @@ def get_from_cache(url, cache_dir=None):
meta = {'url': url, 'etag': etag}
meta_path = cache_path + '.json'
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)