Skip to content

Commit d399f08

Browse files
authored
check if docker is installed if user_docker is True (microsoft#1145)
1 parent d685a56 commit d399f08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

autogen/code_utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ def execute_code(
272272
logger.error(error_msg)
273273
raise AssertionError(error_msg)
274274

275+
if use_docker and docker is None:
276+
error_msg = "Cannot use docker because the python docker package is not available."
277+
logger.error(error_msg)
278+
raise AssertionError(error_msg)
279+
275280
# Warn if use_docker was unspecified (or None), and cannot be provided (the default).
276281
# In this case the current behavior is to fall back to run natively, but this behavior
277282
# is subject to change.

0 commit comments

Comments
 (0)