[pkg-eucalyptus-commits] [euca2ools] 30/41: Fix over-zealous dir deletion in BundleVol

Charles Plessy plessy at alioth.debian.org
Sat Oct 12 03:24:22 UTC 2013


This is an automated email from the git hooks/post-receive script.

plessy pushed a commit to branch master
in repository euca2ools.

commit 5725f0b1e2643799bf56fb50c76a55632b09f56a
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Mon Sep 9 13:57:34 2013 -0700

    Fix over-zealous dir deletion in BundleVol
---
 euca2ools/commands/bundle/bundlevol.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/euca2ools/commands/bundle/bundlevol.py b/euca2ools/commands/bundle/bundlevol.py
index 312a740..c6fde69 100644
--- a/euca2ools/commands/bundle/bundlevol.py
+++ b/euca2ools/commands/bundle/bundlevol.py
@@ -175,7 +175,8 @@ class BundleVol(BundleCreator):
         finally:
             if os.path.exists(image_file):
                 os.remove(image_file)
-                os.rmdir(os.path.dirname(image_file))
+                if len(os.listdir(os.path.dirname(image_file))) == 0:
+                    os.rmdir(os.path.dirname(image_file))
 
     def print_result(self, result):
         for part_filename in result[0]:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-eucalyptus/euca2ools.git



More information about the pkg-eucalyptus-commits mailing list