From b273b893c079a6435357fee63afa2774b41fbb13 Mon Sep 17 00:00:00 2001 From: James Seden Smith Date: Thu, 27 Apr 2017 12:06:53 +0100 Subject: [PATCH 1/2] Fixed download_csl to work on windows --- md_pdf/csl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/md_pdf/csl.py b/md_pdf/csl.py index bd8f08e..7a18123 100644 --- a/md_pdf/csl.py +++ b/md_pdf/csl.py @@ -24,7 +24,6 @@ def download_csl(): bar = ProgressBar() remove_dir(CSL_DIR) - remove_dir(CSL_DOWNLOAD_LINK) def download_handle(count, block_size, total_size): bar.update(int(count * block_size * 100 / total_size)) @@ -47,6 +46,7 @@ def download_csl(): bar.finish() + os.close(_) logger.info("Cleaning Up...") shutil.copytree(CSL_TEMP_DIR, CSL_DIR) os.remove(download_location) From 3e4e47c0b1bd9d15e433865738ebabdbce3ed05e Mon Sep 17 00:00:00 2001 From: James Seden Smith Date: Thu, 27 Apr 2017 13:39:59 +0100 Subject: [PATCH 2/2] Moved line into correct section --- md_pdf/csl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/md_pdf/csl.py b/md_pdf/csl.py index 7a18123..3bf07c6 100644 --- a/md_pdf/csl.py +++ b/md_pdf/csl.py @@ -46,8 +46,8 @@ def download_csl(): bar.finish() - os.close(_) logger.info("Cleaning Up...") + os.close(_) shutil.copytree(CSL_TEMP_DIR, CSL_DIR) os.remove(download_location) remove_dir(CSL_TEMP_DIR)