]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
python: Update scripts to respect PEP-8 spec
authorStéphane Graber <stgraber@ubuntu.com>
Mon, 8 Jul 2013 14:46:20 +0000 (10:46 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 8 Jul 2013 15:50:42 +0000 (11:50 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/python-lxc/examples/pyconsole-vte.py
src/python-lxc/examples/pyconsole.py
src/python-lxc/lxc/__init__.py

index 79267587aa6a0b6192ed31b2b40970b573cf48e1..9938e6af04bfa2d2f1c4fe06a6792a40f3a1a612 100755 (executable)
@@ -11,9 +11,11 @@ import vte
 import lxc
 import sys
 
+
 def gtk_exit_cb(terminal):
     gtk.main_quit()
 
+
 def vte_con(ct, ttynum):
     print("Doing console in a VTE widget...")
     masterfd = ct.console_getfd(ttynum)
index 7661ef48d6584f52f3461bf1eabf226c691bb39a..36d4838c1788b38620f4b9b587c3c8b7fcde471f 100755 (executable)
@@ -22,7 +22,8 @@ if __name__ == '__main__':
 
     ct = lxc.Container(sys.argv[1])
 
-    print("Container:%s tty:%d Ctrl-%c q to quit" % (ct.name, ttynum, ord('a') + escape-1))
+    print("Container:%s tty:%d Ctrl-%c q to quit" %
+          (ct.name, ttynum, ord('a') + escape-1))
     time.sleep(1)
     if not ct.defined:
         sys.exit("Container %s not defined" % ct.name)
index c15cfad0b7a4e6c1d893ba6790eba3339f7f87d0..9ada7ffef94bbb6dbb601af8d431b30141d0e272 100644 (file)
@@ -292,7 +292,7 @@ class Container(_lxc.Container):
         self.load_config()
         return True
 
-    def console(self, ttynum = -1, stdinfd = 0, stdoutfd = 1, stderrfd = 2, escape = 1):
+    def console(self, ttynum=-1, stdinfd=0, stdoutfd=1, stderrfd=2, escape=1):
         """
             Attach to console of running container.
         """
@@ -300,9 +300,10 @@ class Container(_lxc.Container):
         if not self.running:
             return False
 
-        return _lxc.Container.console(self, ttynum, stdinfd, stdoutfd, stderrfd, escape)
+        return _lxc.Container.console(self, ttynum, stdinfd, stdoutfd,
+                                      stderrfd, escape)
 
-    def console_getfd(self, ttynum = -1):
+    def console_getfd(self, ttynum=-1):
         """
             Attach to console of running container.
         """