The timeout option in get_ips has been deprecated, so work around it.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
import sys
import subprocess
import tempfile
+import time
_ = gettext.gettext
gettext.textdomain("lxc-start-ephemeral")
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: