~larryprice/libertine/libertined-output

« back to all changes in this revision

Viewing changes to python/libertine/LxdContainer.py

  • Committer: Larry Price
  • Date: 2017-03-20 20:37:43 UTC
  • Revision ID: larry.price@canonical.com-20170320203743-p2orp7mkrlyzn30r
undo accidents

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
        return True
67
67
 
68
68
    utils.get_logger().info("Running LXD setup.")
69
 
    import pexpect, sys
 
69
    import pexpect
70
70
    child = pexpect.spawnu('sudo libertine-lxd-setup {}'.format(os.environ['USER']), env={'TERM': 'dumb'})
71
 
    child.logfile = sys.stdout
 
71
 
72
72
    while True:
73
73
        index = child.expect(['.+\[default=.+\].*', pexpect.EOF, pexpect.TIMEOUT,
74
74
                              # The following are required for lxd=2.0.x