diff --git a/README.md b/README.md index 4573fba..194edff 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Test Coverage](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/badges/coverage.svg)](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/coverage) [![Issue Count](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/badges/issue_count.svg)](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status) -**Many, many thanks to all contributors! As of now, 32 of the modules are from various contributors (!), and only 16 from myself.** +**Many, many thanks to all contributors! As of now, 33 of the modules are from various contributors (!), and only 16 from myself.** ![Solarized Powerline](https://github.com/tobi-wan-kenobi/bumblebee-status/blob/master/screenshots/themes/powerline-solarized.png) diff --git a/bumblebee/modules/docker_ps.py b/bumblebee/modules/docker_ps.py index 5c1e031..c36c0e7 100644 --- a/bumblebee/modules/docker_ps.py +++ b/bumblebee/modules/docker_ps.py @@ -29,9 +29,11 @@ class Module(bumblebee.engine.Module): self._status = self.status def status(self, _): - cli = docker.DockerClient(base_url='unix://var/run/docker.sock') try: + cli = docker.DockerClient(base_url='unix://var/run/docker.sock') cli.ping() except ConnectionError: return "Daemon off" + except Exception: + return "n/a" return "OK - {}".format(len(cli.containers.list(filters={'status': "running"})))