mirror of
https://github.com/microsoft/autogen.git
synced 2025-12-30 00:30:23 +00:00
check if docker is installed if user_docker is True (#1145)
This commit is contained in:
parent
871e9e28b3
commit
55b03bfac6
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user