Skip to content

Commit

Permalink
more explicit docker error name
Browse files Browse the repository at this point in the history
  • Loading branch information
tjamet committed Jun 10, 2016
1 parent d13d704 commit 0b58872
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/integration/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
from caduc.cmd import create_watcher
from .. import mock

e = None
docker_error = None
no_docker = False
try:
docker.Client(**docker.utils.kwargs_from_env(assert_hostname=False)).version()
except Exception as e:
docker_error = e
no_docker = True


Expand All @@ -41,7 +42,7 @@ def _trigger(self):
def __str__(self):
return "<Timer: delay: %s started: %s>" % (self.delay, self.started)

@unittest.skipIf(no_docker, "Failed to connect to docker host, error: %s" % e)
@unittest.skipIf(no_docker, "Failed to connect to docker host, error: %s" % docker_error)
class IntegrationTest(unittest.TestCase):
def setUp(self):
self.logger = logging.getLogger(type(self).__name__)
Expand Down

0 comments on commit 0b58872

Please sign in to comment.