[lxc-devel] [PATCH] lxc-start-ephemeral: fix pep-8 and pyflakes3

Stéphane Graber stgraber at ubuntu.com
Thu Jan 22 16:55:21 UTC 2015


This defines a missing variable and re-indents the code a bit.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/lxc-start-ephemeral.in | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in
index 66abe56..b049f80 100644
--- a/src/lxc/lxc-start-ephemeral.in
+++ b/src/lxc/lxc-start-ephemeral.in
@@ -239,6 +239,7 @@ LXC_NAME="%s"
 
     count = 0
     for entry in overlay_dirs:
+        tmpdir = "%s/tmpfs" % dest_path
         deltdir = "%s/delta%s" % (tmpdir, count)
         workdir = "%s/work%s" % (tmpdir, count)
         fd.write("mkdir -p %s %s\n" % (deltdir, entry[1]))
@@ -250,23 +251,25 @@ LXC_NAME="%s"
             fd.write("mkdir %s\n" % deltdir)
             fd.write("mkdir %s\n" % workdir)
 
-        fd.write("getfacl -a %s | setfacl --set-file=- %s || true\n" % (entry[0], deltdir))
-        fd.write("getfacl -a %s | setfacl --set-file=- %s || true\n" % (entry[0], entry[1]))
+        fd.write("getfacl -a %s | setfacl --set-file=- %s || true\n" %
+                 (entry[0], deltdir))
+        fd.write("getfacl -a %s | setfacl --set-file=- %s || true\n" %
+                 (entry[0], entry[1]))
 
         if args.union_type == "overlayfs":
             if have_new_overlay:
                 fd.write("mount -n -t overlay"
-                     " -oupperdir=%s,lowerdir=%s,workdir=%s none %s\n" % (
-                         deltdir,
-                         entry[0],
-                         workdir,
-                         entry[1]))
+                         " -oupperdir=%s,lowerdir=%s,workdir=%s none %s\n" % (
+                             deltdir,
+                             entry[0],
+                             workdir,
+                             entry[1]))
             else:
                 fd.write("mount -n -t overlayfs"
-                     " -oupperdir=%s,lowerdir=%s none %s\n" % (
-                         deltdir,
-                         entry[0],
-                         entry[1]))
+                         " -oupperdir=%s,lowerdir=%s none %s\n" % (
+                             deltdir,
+                             entry[0],
+                             entry[1]))
         elif args.union_type == "aufs":
             xino_path = "%s/lxc/aufs.xino" % get_rundir()
             if not os.path.exists(os.path.basename(xino_path)):
-- 
1.9.1



More information about the lxc-devel mailing list