Skip to content
Snippets Groups Projects
Commit 62afbffe authored by Alan De Smet's avatar Alan De Smet
Browse files

add arg_directory; tests valid directory argument

parent 286a6c97
Branches
No related tags found
No related merge requests found
......@@ -69,6 +69,12 @@ def add_cache_dir_arg(parser):
default=CACHE_DEFAULT
)
def arg_directory(arg):
if not os.path.exists(arg):
argerror('The directory "{0}" does not exist'.format(arg))
if not os.path.isdir(arg):
argerror('The path "{0}" is not a directory'.format(arg))
return os.path.abspath(arg)
def arg_valid_cache_dir(arg):
if arg == CACHE_INVALID:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment