--- a/components/docker/files/docker-support Fri Mar 10 15:41:57 2017 -0800
+++ b/components/docker/files/docker-support Tue Mar 14 16:42:34 2017 -0700
@@ -1,6 +1,6 @@
#!/usr/bin/python2.7
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
#
import argparse
@@ -39,7 +39,7 @@
con = HTTPConnectionSocket(DOCKER_SOCK)
con.request("GET", url)
resp = con.getresponse()
- except httplib.HTTPException as err:
+ except (socket.error, httplib.HTTPException) as err:
raise RuntimeError("unable to call API: %s" % err)
# expect standard success status
@@ -169,7 +169,7 @@
return [container['Id'] for container in
do_api_get("http:/containers/json")]
except RuntimeError as e:
- print "unable to query api for container list: %s" % e
+ raise SystemExit("unable to query api for container list: %s" % e)
def kill_container(cid):