From: Stéphane Graber Date: Wed, 19 Jun 2013 18:12:37 +0000 (-0400) Subject: lxc-start-ephemeral: Fix get_ips call X-Git-Tag: lxc-1.0.0.alpha1~1^2~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=618fa49dddbedd2b7319c0089dffd8d65aef8369;p=thirdparty%2Flxc.git lxc-start-ephemeral: Fix get_ips call The timeout option in get_ips has been deprecated, so work around it. Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in index b5cad9a4e..94cbf3800 100644 --- a/src/lxc/lxc-start-ephemeral.in +++ b/src/lxc/lxc-start-ephemeral.in @@ -36,6 +36,7 @@ import os import sys import subprocess import tempfile +import time _ = gettext.gettext gettext.textdomain("lxc-start-ephemeral") @@ -259,7 +260,12 @@ if not args.command and not args.daemon: sys.exit(0) # Try to get the IP addresses -ips = dest.get_ips(timeout=10) +ips = None +timeout = 5 +while not ips and timeout != 0: + ips = dest.get_ips() + time.sleep(1) + timeout -= 1 # Deal with the case where we just print info about the container if args.daemon: