[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a

Matt Spaulding mspaulding06 at gmail.com
Sun Jun 16 02:31:24 UTC 2013


The following commit has been merged in the master branch:
commit c1368dab4ed802527d2c84783884a78da6d84f77
Author: Matt Spaulding <mspaulding06 at gmail.com>
Date:   Mon May 13 14:43:21 2013 -0700

    Do cleanup of the image file

diff --git a/euca2ools/commands/bundle/bundlevol.py b/euca2ools/commands/bundle/bundlevol.py
index bb7a25e..654585c 100644
--- a/euca2ools/commands/bundle/bundlevol.py
+++ b/euca2ools/commands/bundle/bundlevol.py
@@ -171,10 +171,15 @@ class BundleVol(BundleCommand):
             self._inherit_metadata()
         
         image_file = ImageCreator(log=self.log, **self.args).run()
-        image_args = self._filter_args_for_bundle_image()
-        image_args.update(image=image_file, image_type='machine')
-        self.log.info("bundling image: {0}".format(image_file))
-        return BundleImage(**image_args).main()
+        try:
+            image_args = self._filter_args_for_bundle_image()
+            image_args.update(image=image_file, image_type='machine')
+            self.log.info("bundling image: {0}".format(image_file))
+            return BundleImage(**image_args).main()
+        finally:
+            if os.path.exists(image_file):
+                os.remove(image_file)
+                os.rmdir(os.path.dirname(image_file))
 
     def print_result(self, result):
         for part_filename in result[0]:

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list