[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 74: Clean up tmpdirs on successful deployment

Message ID 20110706184108.10490.70553.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Paul Larson July 6, 2011, 6:41 p.m.
------------------------------------------------------------
revno: 74
fixes bug(s): https://launchpad.net/bugs/806571
committer: Paul Larson <paul.larson@canonical.com>
branch nick: dispatcher-testing-branch
timestamp: Wed 2011-07-06 12:16:22 -0500
message:
  Clean up tmpdirs on successful deployment
modified:
  lava_dispatcher/actions/android_deploy.py
  lava_dispatcher/actions/deploy.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription

Patch

=== modified file 'lava_dispatcher/actions/android_deploy.py'
--- lava_dispatcher/actions/android_deploy.py	2011-06-29 10:22:40 +0000
+++ lava_dispatcher/actions/android_deploy.py	2011-07-06 17:16:22 +0000
@@ -58,8 +58,9 @@ 
             self.deploy_linaro_android_testrootfs(system_url)
             self.purge_linaro_android_sdcard()
         except:
+            raise
+        finally:
             shutil.rmtree(self.tarball_dir)
-            raise
 
     def download_tarballs(self, boot_url, system_url, data_url, use_cache=True):
         """Download tarballs from a boot, system and data tarball url

=== modified file 'lava_dispatcher/actions/deploy.py'
--- lava_dispatcher/actions/deploy.py	2011-06-27 04:55:08 +0000
+++ lava_dispatcher/actions/deploy.py	2011-07-06 17:16:22 +0000
@@ -51,8 +51,9 @@ 
             self.deploy_linaro_rootfs(root_url)
             self.deploy_linaro_bootfs(boot_url)
         except:
+            raise
+        finally:
             shutil.rmtree(self.tarball_dir)
-            raise
 
     def _get_partition_offset(self, image, partno):
         cmd = 'parted %s -m -s unit b print' % image