projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
aab4b15
)
Fix a bug in tmp dir removal
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Fri, 18 Jan 2013 16:48:07 +0000
(18:48 +0200)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Fri, 18 Jan 2013 16:48:07 +0000
(18:48 +0200)
snf-image-creator removed /var/tmp if the directory was empty
image_creator/disk.py
patch
|
blob
|
history
diff --git
a/image_creator/disk.py
b/image_creator/disk.py
index
0a197c2
..
e0ee867
100644
(file)
--- a/
image_creator/disk.py
+++ b/
image_creator/disk.py
@@
-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: