Fixed download_csl to work on windows
This commit is contained in:
parent
56c55e005b
commit
b273b893c0
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,6 @@ def download_csl():
|
||||||
bar = ProgressBar()
|
bar = ProgressBar()
|
||||||
|
|
||||||
remove_dir(CSL_DIR)
|
remove_dir(CSL_DIR)
|
||||||
remove_dir(CSL_DOWNLOAD_LINK)
|
|
||||||
|
|
||||||
def download_handle(count, block_size, total_size):
|
def download_handle(count, block_size, total_size):
|
||||||
bar.update(int(count * block_size * 100 / total_size))
|
bar.update(int(count * block_size * 100 / total_size))
|
||||||
|
@ -47,6 +46,7 @@ def download_csl():
|
||||||
|
|
||||||
bar.finish()
|
bar.finish()
|
||||||
|
|
||||||
|
os.close(_)
|
||||||
logger.info("Cleaning Up...")
|
logger.info("Cleaning Up...")
|
||||||
shutil.copytree(CSL_TEMP_DIR, CSL_DIR)
|
shutil.copytree(CSL_TEMP_DIR, CSL_DIR)
|
||||||
os.remove(download_location)
|
os.remove(download_location)
|
||||||
|
|
Reference in a new issue