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
f6ea8d02
Commit
f6ea8d02
authored
12 years ago
by
Nikos Skalkotos
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bug in tmp dir removal
snf-image-creator removed /var/tmp if the directory was empty
parent
aab4b154
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/disk.py
+2
-1
2 additions, 1 deletion
image_creator/disk.py
with
2 additions
and
1 deletion
image_creator/disk.py
+
2
−
1
View file @
f6ea8d02
...
...
@@ -45,6 +45,7 @@ import uuid
import
re
import
sys
import
guestfs
import
shutil
from
sendfile
import
sendfile
...
...
@@ -77,7 +78,7 @@ class Disk(object):
self
.
tmp
=
tempfile
.
mkdtemp
(
prefix
=
'
.snf_image_creator.
'
,
dir
=
self
.
_get_tmp_dir
(
tmp
))
self
.
_add_cleanup
(
os
.
removedirs
,
self
.
tmp
)
self
.
_add_cleanup
(
shutil
.
rmtree
,
self
.
tmp
)
def
_get_tmp_dir
(
self
,
default
=
None
):
if
default
is
not
None
:
...
...
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