[libvirt] [sandbox PATCH 3/6] Only create the destination directory if it does not exist.
dwalsh at redhat.com
dwalsh at redhat.com
Thu Apr 18 18:34:52 UTC 2013
From: Dan Walsh <dwalsh at redhat.com>
If a user specifies a path that already exists, we should just
use the path.
---
bin/virt-sandbox-service | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index 6524a05..308b871 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -258,7 +258,8 @@ class Container:
def create(self):
self.connect()
- os.mkdir(self.dest)
+ if not os.path.exists(self.dest):
+ os.mkdir(self.dest)
def connect(self):
if not self.conn:
--
1.8.2
More information about the libvir-list
mailing list