removing redundant .flush
This commit is contained in:
@@ -385,8 +385,6 @@ def get_from_cache(
|
|||||||
else:
|
else:
|
||||||
http_get(url, temp_file, proxies=proxies, resume_size=resume_size, user_agent=user_agent)
|
http_get(url, temp_file, proxies=proxies, resume_size=resume_size, user_agent=user_agent)
|
||||||
|
|
||||||
# we are copying the file before closing it, so flush to avoid truncation
|
|
||||||
temp_file.flush()
|
|
||||||
|
|
||||||
logger.info("storing %s in cache at %s", url, cache_path)
|
logger.info("storing %s in cache at %s", url, cache_path)
|
||||||
os.rename(temp_file.name, cache_path)
|
os.rename(temp_file.name, cache_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user