From ff78578910c23a90bcab3cfc77fc8e6498b883f7 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Fri, 7 Feb 2020 15:39:48 -0800 Subject: [PATCH] If docker is installed but not running, use DockerInstaller to launch it --- dangerzone/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dangerzone/__init__.py b/dangerzone/__init__.py index 97c09ed..72e6eff 100644 --- a/dangerzone/__init__.py +++ b/dangerzone/__init__.py @@ -29,8 +29,10 @@ def main(filename): common = Common(app) # See if we need to install Docker... - if platform.system() == "Darwin" and not is_docker_installed(common): - print("Docker is not installed!") + if platform.system() == "Darwin" and ( + not is_docker_installed(common) or not is_docker_ready(common) + ): + print("Docker is either not installed or not running") docker_installer = DockerInstaller(common) if docker_installer.start(): # When installer finished, wait up to 20 minutes for the user to launch it