Skip to content

Commit 5d44a2d

Browse files
RobPasMuepyansys-ci-botpre-commit-ci[bot]
committed
fix: prepare_and_start_backend is only available on Windows (#1076)
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 743fbe5 commit 5d44a2d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/changelog.d/1076.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: prepare_and_start_backend is only available on Windows

src/ansys/geometry/core/connection/product_instance.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ def prepare_and_start_backend(
193193
"""
194194
from ansys.geometry.core.modeler import Modeler
195195

196+
if os.name != "nt": # pragma: no cover
197+
raise RuntimeError("Method 'prepare_and_start_backend' is only available on Windows.")
198+
196199
port = _check_port_or_get_one(port)
197200
installations = get_available_ansys_installations()
198201
if product_version != None:
@@ -294,7 +297,6 @@ def _start_program(args: List[str], local_env: Dict[str, str]) -> subprocess.Pop
294297
"""
295298
return subprocess.Popen(
296299
args,
297-
shell=os.name != "nt",
298300
stdin=subprocess.DEVNULL,
299301
stdout=subprocess.DEVNULL,
300302
stderr=subprocess.DEVNULL,

0 commit comments

Comments
 (0)