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)
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.
"""
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.
"""