Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

lxc-start-ephemeral: Drop stop() calls when shutdown() returns non-True

shutdown() when given a timeout already does a stop call so there's no
need to check its return value and do another one.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information...
commit 369bb8665eecea6280db511bf8ddf1b73a294b0f 1 parent 1a99ae7
@stgraber stgraber authored hallyn committed
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/lxc/lxc-start-ephemeral.in
View
6 src/lxc/lxc-start-ephemeral.in
@@ -251,8 +251,7 @@ The following IP addresses have be found in the container:
sys.exit(0)
else:
dest.console(tty=1)
- if not dest.shutdown(timeout=5):
- dest.stop()
+ dest.shutdown(timeout=5)
sys.exit(0)
# Now deal with the case where we want to run a command in the container
@@ -286,5 +285,4 @@ for ip in ips:
break
# Shutdown the container
-if not dest.shutdown(timeout=5):
- dest.stop()
+dest.shutdown(timeout=5)
Please sign in to comment.
Something went wrong with that request. Please try again.