From a20fdbd8ee148e545eff94e763310e32c2cef774 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 1 Feb 2015 13:22:23 +1100 Subject: [PATCH] * Upd download script --- spacy/en/download.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacy/en/download.py b/spacy/en/download.py index 0355092c1..45077ee2e 100644 --- a/spacy/en/download.py +++ b/spacy/en/download.py @@ -1,3 +1,4 @@ +from __future__ import print_function from os import path import os import tarfile @@ -44,7 +45,9 @@ def main(data_size='all'): data_url = ALL_DATA_DIR_URL elif data_size == 'small': data_url = SM_DATA_DIR_URL - shutil.move(DEST_DIR, '/tmp') + if path.exists(DEST_DIR): + print("Moving existing dir %s to /tmp" % DEST_DIR) + shutil.move(DEST_DIR, '/tmp') install_data(data_url, path.dirname(DEST_DIR))