Skip to content

Commit

Permalink
Merge pull request #1 from jmatsumura/master
Browse files Browse the repository at this point in the history
Allowing dynamic creation of a directory if it does not already exist
  • Loading branch information
jmatsumura authored Jun 13, 2017
2 parents ef01a9a + 65ec791 commit cdefe7a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Contact: [email protected]

# 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
Expand All @@ -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 = []
Expand Down

0 comments on commit cdefe7a

Please sign in to comment.