[PATCH 11/16] Change makedirs and makefiles to be internal methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 bin/virt-sandbox-service | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index f32fd4a..9f4941b 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -453,7 +453,7 @@ PrivateNetwork=false
                 dest = root + "/" + d
                 self._fix_stat(dest[l:])
 
-    def makedirs(self, d):
+    def _makedirs(self, d):
         try:
             path = "%s%s" % (self.dest, d)
             os.makedirs(path)
@@ -461,8 +461,8 @@ PrivateNetwork=false
             if not e.errno == errno.EEXIST:
                 raise e
 
-    def makefile(self, f):
-        self.makedirs(os.path.dirname(f))
+    def _makefile(self, f):
+        self._makedirs(os.path.dirname(f))
         try:
             path = "%s%s" % (self.dest, f)
             fd=open(path, "w")
@@ -476,20 +476,20 @@ PrivateNetwork=false
             for d in self.dirs:
                 shutil.copytree(d, "%s%s" % (self.dest, d), symlinks=True)
             for f in self.files:
-                self.makedirs(os.path.dirname(f))
+                self._makedirs(os.path.dirname(f))
                 shutil.copy(f, "%s%s" % (self.dest, f))
         else:
             for d in self.all_dirs:
-                self.makedirs(d)
+                self._makedirs(d)
             for f in self.files:
-                self.makedirs(os.path.dirname(f))
-                self.makefile(f)
+                self._makedirs(os.path.dirname(f))
+                self._makefile(f)
 
         for d in self.BIND_SYSTEM_DIRS + self.MAKE_SYSTEM_DIRS:
-            self.makedirs(d)
+            self._makedirs(d)
 
         for f in self.BIND_SYSTEM_FILES:
-            self.makefile(f)
+            self._makefile(f)
 
         shutil.copy(self.FUNCTIONS, "%s%s" % (self.dest, self.FUNCTIONS))
 
@@ -506,8 +506,8 @@ PrivateNetwork=false
         unitdir = "/etc/systemd/system"
         tgtdir = unitdir + "/multi-user.target.wants"
 
-        self.makedirs(unitdir)
-        self.makedirs(tgtdir)
+        self._makedirs(unitdir)
+        self._makedirs(tgtdir)
         os.symlink("/run", self.dest + "/var/run")
 
         for i, src in self.unit_file_list:
-- 
1.8.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]