Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkundu1 committed Dec 17, 2024
1 parent 2f9c5c6 commit ddfc49f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/ansys/fluent/core/launcher/pyfluent_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,7 @@ def _get_running_session_mode(
return session_mode.get_fluent_value()


def _get_standalone_launch_fluent_version(
product_version: FluentVersion | str | float | int | None,
) -> FluentVersion | None:
def _get_standalone_launch_fluent_version(argvals) -> FluentVersion | None:
"""Determine the Fluent version during the execution of the ``launch_fluent()``
method in standalone mode.
Expand All @@ -295,9 +293,14 @@ def _get_standalone_launch_fluent_version(

# Look for Fluent version in the following order:
# 1. product_version parameter passed with launch_fluent
product_version = argvals.get("product_version")
if product_version:
return FluentVersion(product_version)

# If fluent_path is provided, we cannot determine the Fluent version, so returning None.
if argvals.get("fluent_path"):
return None

# (DEV) if "PYFLUENT_FLUENT_ROOT" environment variable is defined, we cannot
# determine the Fluent version, so returning None.
if os.getenv("PYFLUENT_FLUENT_ROOT"):
Expand Down
4 changes: 1 addition & 3 deletions src/ansys/fluent/core/launcher/standalone_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ def __init__(
self.argvals["start_timeout"] = 60
if self.argvals["lightweight_mode"] is None:
self.argvals["lightweight_mode"] = False
fluent_version = _get_standalone_launch_fluent_version(
self.argvals["product_version"]
)
fluent_version = _get_standalone_launch_fluent_version(self.argvals)
if fluent_version:
_raise_non_gui_exception_in_windows(self.argvals["ui_mode"], fluent_version)

Expand Down

0 comments on commit ddfc49f

Please sign in to comment.