diff --git a/bin/client.py b/bin/client.py index 8fd66b2..5cc6900 100755 --- a/bin/client.py +++ b/bin/client.py @@ -8,7 +8,7 @@ # Contact: jmatsumura@som.umaryland.edu # base 3.6 lib(s) -import argparse +import argparse,os,errno from process_manifest import download_manifest from convert_to_manifest import file_to_manifest,url_to_manifest,token_to_manifest @@ -32,6 +32,13 @@ def main(): if ep not in ['HTTP','FTP','S3']: sys.exit("Error -- Entered a non-valid endpoint. Please check the endpoint_priority option for what are considered valid entries.") + if args.destination != ".": + try: + os.makedirs(args.destination) + except OSERROR as exception: + if exception.errno != errno.EEXIST: + raise + keep_trying = True attempts = 0 result = []