From da4c9cee06e6a25470619fa20c1454cc78407d24 Mon Sep 17 00:00:00 2001 From: Henning Peters Date: Tue, 20 Oct 2015 19:33:59 +0200 Subject: [PATCH] assert filename match --- spacy/en/download.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spacy/en/download.py b/spacy/en/download.py index 8711a390b..662948f93 100644 --- a/spacy/en/download.py +++ b/spacy/en/download.py @@ -28,8 +28,10 @@ def install_data(url, path, filename): except FileExistsError: pass - filename = download_file(url, os.path.join(path, filename)) - t = tarfile.open(filename) + download_path = os.path.join(path, filename) + tmp = download_file(url, download_path) + assert tmp == download_path + t = tarfile.open(download_path) t.extractall(path)