Skip to content

Commit 1cde20a

Browse files
committed
[OMCProcessDocker*] rename class methods
1 parent 1023179 commit 1cde20a

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

OMPython/OMCSession.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def __init__(
724724
self._interactivePort = port
725725

726726
# start up omc executable in docker container waiting for the ZMQ connection
727-
self._omc_process, self._docker_process, self._dockerCid = self._omc_docker_start()
727+
self._omc_process, self._docker_process, self._dockerCid = self._docker_omc_start()
728728
# connect to the running omc instance using ZMQ
729729
self._omc_port = self._omc_port_get()
730730

@@ -744,7 +744,7 @@ def __del__(self) -> None:
744744
finally:
745745
self._docker_process = None
746746

747-
def _omc_command_docker(
747+
def _docker_omc_cmd(
748748
self,
749749
omc_path_and_args_list: list[str],
750750
docker_cid_file: pathlib.Path,
@@ -795,12 +795,12 @@ def _omc_command_docker(
795795

796796
return omc_command
797797

798-
def _omc_docker_start(self) -> Tuple[subprocess.Popen, DummyPopen, str]:
798+
def _docker_omc_start(self) -> Tuple[subprocess.Popen, DummyPopen, str]:
799799
my_env = os.environ.copy()
800800

801801
docker_cid_file = self._temp_dir / (self._omc_filebase + ".docker.cid")
802802

803-
omc_command = self._omc_command_docker(
803+
omc_command = self._docker_omc_cmd(
804804
omc_path_and_args_list=["--locale=C",
805805
"--interactive=zmq",
806806
f"-z={self._random_string}"],
@@ -868,7 +868,7 @@ def __init__(
868868
self._interactivePort = port
869869

870870
# start up omc executable in docker container waiting for the ZMQ connection
871-
self._omc_process, self._docker_process = self._omc_docker_start()
871+
self._omc_process, self._docker_process = self._docker_omc_start()
872872
# connect to the running omc instance using ZMQ
873873
self._omc_port = self._omc_port_get()
874874

@@ -879,7 +879,7 @@ def __del__(self) -> None:
879879
# docker container ID was provided - do NOT kill the docker process!
880880
self._docker_process = None
881881

882-
def _omc_command_docker(self, omc_path_and_args_list) -> list:
882+
def _docker_omc_cmd(self, omc_path_and_args_list) -> list:
883883
"""
884884
Define the command that will be called by the subprocess module.
885885
"""
@@ -906,12 +906,14 @@ def _omc_command_docker(self, omc_path_and_args_list) -> list:
906906

907907
return omc_command
908908

909-
def _omc_docker_start(self) -> Tuple[subprocess.Popen, DummyPopen]:
909+
def _docker_omc_start(self) -> Tuple[subprocess.Popen, DummyPopen]:
910910
my_env = os.environ.copy()
911911

912-
omc_command = self._omc_command_docker(omc_path_and_args_list=["--locale=C",
913-
"--interactive=zmq",
914-
f"-z={self._random_string}"])
912+
omc_command = self._docker_omc_cmd(
913+
omc_path_and_args_list=["--locale=C",
914+
"--interactive=zmq",
915+
f"-z={self._random_string}"],
916+
)
915917

916918
omc_process = subprocess.Popen(omc_command,
917919
stdout=self._omc_loghandle,

0 commit comments

Comments
 (0)