Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-image-creator
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-image-creator
Commits
fd9ecc9e
Commit
fd9ecc9e
authored
9 years ago
by
Nikos Skalkotos
Browse files
Options
Downloads
Patches
Plain Diff
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
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
image_creator/main.py
+3
-0
3 additions, 0 deletions
image_creator/main.py
with
3 additions
and
0 deletions
image_creator/main.py
+
3
−
0
View file @
fd9ecc9e
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment