Je teste que le fichier local n'existe pas avant de le télécharger

parent 21abf22c
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
"\n", "\n",
"import os\n", "import os\n",
"import urllib.request\n", "import urllib.request\n",
"urllib.request.urlretrieve(data_url, data_file)" "if not os.path.exists(data_file):\n",
" urllib.request.urlretrieve(data_url, data_file)"
] ]
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment