Skip to content

Commit 28ca381

Browse files
committed
[OMCProcessDocker*] update exception message - make them specific to the error
1 parent abcae09 commit 28ca381

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

OMPython/OMCSession.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,8 @@ def _docker_omc_cmd(
764764
if sys.platform == "win32":
765765
extraFlags = ["-d=zmqDangerousAcceptConnectionsFromAnywhere"]
766766
if not self._interactivePort:
767-
raise OMCSessionException("docker on Windows requires knowing which port to connect to. For "
768-
"dockerContainer=..., the container needs to have already manually exposed "
769-
"this port when it was started (-p 127.0.0.1:n:n) or you get an error later.")
767+
raise OMCSessionException("docker on Windows requires knowing which port to connect to - "
768+
"please set the interactivePort argument")
770769

771770
if sys.platform == "win32":
772771
if isinstance(self._interactivePort, str):
@@ -892,9 +891,10 @@ def _docker_omc_cmd(self, omc_path_and_args_list) -> list:
892891
if sys.platform == "win32":
893892
extraFlags = ["-d=zmqDangerousAcceptConnectionsFromAnywhere"]
894893
if not self._interactivePort:
895-
raise OMCSessionException("docker on Windows requires knowing which port to connect to. For "
896-
"dockerContainer=..., the container needs to have already manually exposed "
897-
"this port when it was started (-p 127.0.0.1:n:n) or you get an error later.")
894+
raise OMCSessionException("Docker on Windows requires knowing which port to connect to - "
895+
"Please set the interactivePort argument. Furthermore, the container needs "
896+
"to have already manually exposed this port when it was started "
897+
"(-p 127.0.0.1:n:n) or you get an error later.")
898898

899899
if isinstance(self._interactivePort, int):
900900
extraFlags = extraFlags + [f"--interactivePort={int(self._interactivePort)}"]

0 commit comments

Comments
 (0)