@@ -769,7 +769,7 @@ class OMCProcessLocal(OMCProcess):
769769 def __init__ (
770770 self ,
771771 timeout : float = 10.00 ,
772- omhome : Optional [str ] = None ,
772+ omhome : Optional [str | os . PathLike ] = None ,
773773 ) -> None :
774774
775775 super ().__init__ (timeout = timeout )
@@ -782,7 +782,7 @@ def __init__(
782782 self ._omc_port = self ._omc_port_get ()
783783
784784 @staticmethod
785- def _omc_home_get (omhome : Optional [str ] = None ) -> pathlib .Path :
785+ def _omc_home_get (omhome : Optional [str | os . PathLike ] = None ) -> pathlib .Path :
786786 # use the provided path
787787 if omhome is not None :
788788 return pathlib .Path (omhome )
@@ -854,7 +854,7 @@ def __init__(
854854 self ,
855855 timeout : float = 10.00 ,
856856 dockerExtraArgs : Optional [list ] = None ,
857- dockerOpenModelicaPath : str = "omc" ,
857+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
858858 dockerNetwork : Optional [str ] = None ,
859859 port : Optional [int ] = None ,
860860 ) -> None :
@@ -864,7 +864,7 @@ def __init__(
864864 dockerExtraArgs = []
865865
866866 self ._dockerExtraArgs = dockerExtraArgs
867- self ._dockerOpenModelicaPath = dockerOpenModelicaPath
867+ self ._dockerOpenModelicaPath = pathlib . PurePosixPath ( dockerOpenModelicaPath )
868868 self ._dockerNetwork = dockerNetwork
869869
870870 self ._interactivePort = port
@@ -970,7 +970,7 @@ def __init__(
970970 timeout : float = 10.00 ,
971971 docker : Optional [str ] = None ,
972972 dockerExtraArgs : Optional [list ] = None ,
973- dockerOpenModelicaPath : str = "omc" ,
973+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
974974 dockerNetwork : Optional [str ] = None ,
975975 port : Optional [int ] = None ,
976976 ) -> None :
@@ -1053,7 +1053,7 @@ def _docker_omc_cmd(
10531053 ]
10541054 + self ._dockerExtraArgs
10551055 + dockerNetworkStr
1056- + [self ._docker , self ._dockerOpenModelicaPath ]
1056+ + [self ._docker , self ._dockerOpenModelicaPath . as_posix () ]
10571057 + omc_path_and_args_list
10581058 + extraFlags )
10591059
@@ -1113,7 +1113,7 @@ def __init__(
11131113 timeout : float = 10.00 ,
11141114 dockerContainer : Optional [str ] = None ,
11151115 dockerExtraArgs : Optional [list ] = None ,
1116- dockerOpenModelicaPath : str = "omc" ,
1116+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
11171117 dockerNetwork : Optional [str ] = None ,
11181118 port : Optional [int ] = None ,
11191119 ) -> None :
@@ -1165,7 +1165,7 @@ def _docker_omc_cmd(self, omc_path_and_args_list) -> list:
11651165 "--user" , str (self ._getuid ()),
11661166 ]
11671167 + self ._dockerExtraArgs
1168- + [self ._dockerCid , self ._dockerOpenModelicaPath ]
1168+ + [self ._dockerCid , self ._dockerOpenModelicaPath . as_posix () ]
11691169 + omc_path_and_args_list
11701170 + extraFlags )
11711171
0 commit comments