Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 13fbe2b9 authored by hhakim's avatar hhakim
Browse files

Ease use of faust data downloader script by creating the output directory if it doesn't exist.

parent 638ab14c
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,11 @@ def download_uncompress(uncompress_dir=None, base_url=BASE_URL, ...@@ -56,7 +56,11 @@ def download_uncompress(uncompress_dir=None, base_url=BASE_URL,
if __name__ == '__main__': if __name__ == '__main__':
from os import mkdir
from os.path import dirname, join
uncompress_dir=None uncompress_dir=None
if len(argv) > 1 and isdir(argv[1]): if len(argv) > 1 and isdir(dirname(argv[1])):
uncompress_dir=argv[1] uncompress_dir = argv[1]
if not exists(uncompress_dir):
mkdir(uncompress_dir)
download_uncompress(uncompress_dir) download_uncompress(uncompress_dir)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment