projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf15a03
)
Remove temporary bundeled image during cleanup
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Fri, 28 Dec 2012 01:16:43 +0000
(
03:16
+0200)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Fri, 28 Dec 2012 01:16:43 +0000
(
03:16
+0200)
image_creator/disk.py
patch
|
blob
|
history
diff --git
a/image_creator/disk.py
b/image_creator/disk.py
index
b662c07
..
a8d5d66
100644
(file)
--- a/
image_creator/disk.py
+++ b/
image_creator/disk.py
@@
-82,7
+82,9
@@
class Disk(object):
def _dir_to_disk(self):
if self.source == '/':
bundle = BundleVolume(self.out, self.meta)
- return self._losetup(bundle.create_image())
+ image = bundle.create_image()
+ self._add_cleanup(os.unlink, image)
+ return self._losetup(image)
raise FatalError("Using a directory as media source is supported")
def cleanup(self):