From 2d319564160e22881e6dda5ec2d4468b39133f11 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 17 Jun 2022 13:35:42 -0400 Subject: [PATCH] Move docker import so it works without docker installed --- codegen/tuigen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codegen/tuigen.py b/codegen/tuigen.py index c6700f7b076..1cddfa29433 100644 --- a/codegen/tuigen.py +++ b/codegen/tuigen.py @@ -33,7 +33,6 @@ convert_path_to_grpc_path, convert_tui_menu_to_func_name, ) -import docker _THIS_DIRNAME = os.path.dirname(__file__) _MESHING_TUI_FILE = os.path.normpath( @@ -98,6 +97,8 @@ def _copy_tui_help_xml_file(): if os.getenv("PYFLUENT_LAUNCH_CONTAINER") == "1": + import docker + client = docker.from_env() container = client.containers.create(_FLUENT_IMAGE_NAME) xml_source = f"/ansys_inc/v{FLUENT_VERSION.replace('.', '')}/commonfiles/help/en-us/fluent_gui_help/fluent_gui_help.xml"