[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, experimental, updated. debian/2.1.1-1_experimental1-51-g95835b7
dkavanagh
dkavanagh at gmail.com
Thu Jan 3 11:06:14 UTC 2013
The following commit has been merged in the experimental branch:
commit 1f32fb915e202ce4ad169ac18878dafad363fac5
Author: dkavanagh <dkavanagh at gmail.com>
Date: Fri Nov 30 11:07:18 2012 -0500
TOOLS-155, remove temp directory tree upon completion of image registration
diff --git a/euca2ools/commands/eustore/installimage.py b/euca2ools/commands/eustore/installimage.py
index e804b2a..1400291 100644
--- a/euca2ools/commands/eustore/installimage.py
+++ b/euca2ools/commands/eustore/installimage.py
@@ -38,6 +38,7 @@ import tarfile
import hashlib
import re
import zlib
+import shutil
import tempfile
import urllib2
import boto
@@ -293,6 +294,7 @@ class InstallImage(AWSQueryRequest):
else:
break
#now, install the image, referencing the kernel/ramdisk
+ image_id = None
for path in names:
name = os.path.basename(path)
if not name.startswith('.'):
@@ -303,7 +305,10 @@ class InstallImage(AWSQueryRequest):
else:
name = name[:-len('.img')]
id = self.bundleFile(path, name, description, arch, kernel_id, ramdisk_id)
- return id
+ image_id = id
+ # make good faith attempt to remove working directory and all files within
+ shutil.rmtree(self.destination, True)
+ return image_id
def main(self, **args):
self.process_args()
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list