Skip to content

Commit

Permalink
check if docker is installed if user_docker is True (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhu authored Jan 5, 2024
1 parent 871e9e2 commit 55b03bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions autogen/code_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ def execute_code(
logger.error(error_msg)
raise AssertionError(error_msg)

if use_docker and docker is None:
error_msg = "Cannot use docker because the python docker package is not available."
logger.error(error_msg)
raise AssertionError(error_msg)

# Warn if use_docker was unspecified (or None), and cannot be provided (the default).
# In this case the current behavior is to fall back to run natively, but this behavior
# is subject to change.
Expand Down

0 comments on commit 55b03bf

Please sign in to comment.