Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelYochpaz committed Feb 29, 2024
1 parent c477ccb commit 0fa3d52
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions demisto_sdk/commands/common/docker_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ def init_global_docker_client(timeout: int = 60, log_prompt: str = ""):
logger.debug(f"{log_prompt} - Using docker mounting: {CAN_MOUNT_FILES}")
try:
DOCKER_CLIENT = docker.from_env(timeout=timeout, use_ssh_client=ssh_client) # type: ignore
except docker.errors.DockerException as e:
logger.warning(f"{log_prompt} - Failed to init docker client. "
"This might indicate that your docker daemon is not running.")
raise e
except docker.errors.DockerException:
logger.warning(
f"{log_prompt} - Failed to init docker client. "
"This might indicate that your docker daemon is not running."
)
raise
docker_user = os.getenv("DOCKERHUB_USER")
docker_pass = os.getenv("DOCKERHUB_PASSWORD")
if docker_user and docker_pass:
Expand Down

0 comments on commit 0fa3d52

Please sign in to comment.