Skip to content
Snippets Groups Projects
Commit fd9ecc9e authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix a bug in CheckWritableDir

If the directory name is empty, it should be treated as ".", the
current directory
parent dc91a698
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,9 @@ class CheckWritableDir(argparse.Action): ...@@ -54,6 +54,9 @@ class CheckWritableDir(argparse.Action):
dirname = os.path.dirname(value) dirname = os.path.dirname(value)
name = os.path.basename(value) name = os.path.basename(value)
if len(dirname) == 0:
dirname = '.'
if dirname and not os.path.isdir(dirname): if dirname and not os.path.isdir(dirname):
raise argparse.ArgumentError( raise argparse.ArgumentError(
self, "`%s' is not an existing directory" % dirname) self, "`%s' is not an existing directory" % dirname)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment