@@ -538,7 +538,7 @@ class OMCProcessLocal(OMCProcess):
538538 def __init__ (
539539 self ,
540540 timeout : float = 10.00 ,
541- omhome : Optional [str ] = None ,
541+ omhome : Optional [str | os . PathLike ] = None ,
542542 ) -> None :
543543
544544 super ().__init__ (timeout = timeout )
@@ -551,7 +551,7 @@ def __init__(
551551 self ._omc_port = self ._omc_port_get ()
552552
553553 @staticmethod
554- def _omc_home_get (omhome : Optional [str ] = None ) -> pathlib .Path :
554+ def _omc_home_get (omhome : Optional [str | os . PathLike ] = None ) -> pathlib .Path :
555555 # use the provided path
556556 if omhome is not None :
557557 return pathlib .Path (omhome )
@@ -623,7 +623,7 @@ def __init__(
623623 self ,
624624 timeout : float = 10.00 ,
625625 dockerExtraArgs : Optional [list ] = None ,
626- dockerOpenModelicaPath : str = "omc" ,
626+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
627627 dockerNetwork : Optional [str ] = None ,
628628 port : Optional [int ] = None ,
629629 ) -> None :
@@ -633,7 +633,7 @@ def __init__(
633633 dockerExtraArgs = []
634634
635635 self ._dockerExtraArgs = dockerExtraArgs
636- self ._dockerOpenModelicaPath = dockerOpenModelicaPath
636+ self ._dockerOpenModelicaPath = pathlib . PurePosixPath ( dockerOpenModelicaPath )
637637 self ._dockerNetwork = dockerNetwork
638638
639639 self ._interactivePort = port
@@ -739,7 +739,7 @@ def __init__(
739739 timeout : float = 10.00 ,
740740 docker : Optional [str ] = None ,
741741 dockerExtraArgs : Optional [list ] = None ,
742- dockerOpenModelicaPath : str = "omc" ,
742+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
743743 dockerNetwork : Optional [str ] = None ,
744744 port : Optional [int ] = None ,
745745 ) -> None :
@@ -822,7 +822,7 @@ def _docker_omc_cmd(
822822 ]
823823 + self ._dockerExtraArgs
824824 + dockerNetworkStr
825- + [self ._docker , self ._dockerOpenModelicaPath ]
825+ + [self ._docker , self ._dockerOpenModelicaPath . as_posix () ]
826826 + omc_path_and_args_list
827827 + extraFlags )
828828
@@ -882,7 +882,7 @@ def __init__(
882882 timeout : float = 10.00 ,
883883 dockerContainer : Optional [str ] = None ,
884884 dockerExtraArgs : Optional [list ] = None ,
885- dockerOpenModelicaPath : str = "omc" ,
885+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
886886 dockerNetwork : Optional [str ] = None ,
887887 port : Optional [int ] = None ,
888888 ) -> None :
@@ -934,7 +934,7 @@ def _docker_omc_cmd(self, omc_path_and_args_list) -> list:
934934 "--user" , str (self ._getuid ()),
935935 ]
936936 + self ._dockerExtraArgs
937- + [self ._dockerCid , self ._dockerOpenModelicaPath ]
937+ + [self ._dockerCid , self ._dockerOpenModelicaPath . as_posix () ]
938938 + omc_path_and_args_list
939939 + extraFlags )
940940
0 commit comments