[libvirt] [sandbox PATCH 10/15] Change variable config to config_path to avoid confusion.

Dan Walsh dwalsh at redhat.com
Wed Apr 3 23:17:28 UTC 2013


save_config uses an internal variable to indicate the path to the virt-sandbox
configuration file, this path renames this variable to prevent confusion.

Signed-off-by: Dan Walsh <dwalsh at redhat.com>
---
 bin/virt-sandbox-service | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index f4df262..91ac914 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -551,13 +551,13 @@ PrivateNetwork=false
             raise OSError(_("Failed to mount image %s on %s") %  (self.image, self.dest))
 
     def save_config(self):
-        config = self.get_config_path()
-        if os.path.exists(config):
-            os.remove(config)
-        self.config.save_to_path(config)
+        config_path = self.get_config_path()
+        if os.path.exists(config_path):
+            os.remove(config_path)
+        self.config.save_to_path(config_path)
         if selinux is not None:
-            selinux.restorecon(config)
-        sys.stdout.write(_("Created sandbox config %s\n") % config)
+            selinux.restorecon(config_path)
+        sys.stdout.write(_("Created sandbox config %s\n") % config_path)
 
     def get_image_path(self):
             mounts = self.config.get_mounts()
-- 
1.8.2




More information about the libvir-list mailing list