Fix a bug in the cts code (if the tmp directory does not
exist yet).

Signed-off-by: Angus Salkeld <[email protected]>
---
 cts/corosync.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cts/corosync.py b/cts/corosync.py
index 1c3ee7d..09c55af 100644
--- a/cts/corosync.py
+++ b/cts/corosync.py
@@ -60,7 +60,8 @@ class CoroConfig(object):
             self.corobase = corobase
         example = self.corobase + "/conf/corosync.conf.example"
 
-        shutil.rmtree (self.new_root)
+        if os.path.isdir(self.new_root):
+            shutil.rmtree (self.new_root)
         os.makedirs (self.new_root + "/etc/corosync")
         shutil.copy (example, self.new_root + "/etc/corosync/corosync.conf")
 
-- 
1.6.6.1


_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to