lxc-start-ephemeral: Fix get_ips call

The timeout option in get_ips has been deprecated, so work around it. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 54c30e29
...@@ -36,6 +36,7 @@ import os ...@@ -36,6 +36,7 @@ import os
import sys import sys
import subprocess import subprocess
import tempfile import tempfile
import time
_ = gettext.gettext _ = gettext.gettext
gettext.textdomain("lxc-start-ephemeral") gettext.textdomain("lxc-start-ephemeral")
...@@ -259,7 +260,12 @@ if not args.command and not args.daemon: ...@@ -259,7 +260,12 @@ if not args.command and not args.daemon:
sys.exit(0) sys.exit(0)
# Try to get the IP addresses # 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 # Deal with the case where we just print info about the container
if args.daemon: if args.daemon:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment