@@ -861,7 +861,7 @@ class OMCProcessLocal(OMCProcess):
861861 def __init__ (
862862 self ,
863863 timeout : float = 10.00 ,
864- omhome : Optional [str ] = None ,
864+ omhome : Optional [str | os . PathLike ] = None ,
865865 ) -> None :
866866
867867 super ().__init__ (timeout = timeout )
@@ -874,7 +874,7 @@ def __init__(
874874 self ._omc_port = self ._omc_port_get ()
875875
876876 @staticmethod
877- def _omc_home_get (omhome : Optional [str ] = None ) -> pathlib .Path :
877+ def _omc_home_get (omhome : Optional [str | os . PathLike ] = None ) -> pathlib .Path :
878878 # use the provided path
879879 if omhome is not None :
880880 return pathlib .Path (omhome )
@@ -985,7 +985,7 @@ def __init__(
985985 self ,
986986 timeout : float = 10.00 ,
987987 dockerExtraArgs : Optional [list ] = None ,
988- dockerOpenModelicaPath : str = "omc" ,
988+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
989989 dockerNetwork : Optional [str ] = None ,
990990 port : Optional [int ] = None ,
991991 ) -> None :
@@ -995,7 +995,7 @@ def __init__(
995995 dockerExtraArgs = []
996996
997997 self ._dockerExtraArgs = dockerExtraArgs
998- self ._dockerOpenModelicaPath = dockerOpenModelicaPath
998+ self ._dockerOpenModelicaPath = pathlib . PurePosixPath ( dockerOpenModelicaPath )
999999 self ._dockerNetwork = dockerNetwork
10001000
10011001 self ._interactivePort = port
@@ -1098,7 +1098,7 @@ def __init__(
10981098 timeout : float = 10.00 ,
10991099 docker : Optional [str ] = None ,
11001100 dockerExtraArgs : Optional [list ] = None ,
1101- dockerOpenModelicaPath : str = "omc" ,
1101+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
11021102 dockerNetwork : Optional [str ] = None ,
11031103 port : Optional [int ] = None ,
11041104 ) -> None :
@@ -1182,7 +1182,7 @@ def _docker_omc_cmd(
11821182 ]
11831183 + self ._dockerExtraArgs
11841184 + dockerNetworkStr
1185- + [self ._docker , self ._dockerOpenModelicaPath ]
1185+ + [self ._docker , self ._dockerOpenModelicaPath . as_posix () ]
11861186 + omc_path_and_args_list
11871187 + extraFlags )
11881188
@@ -1239,7 +1239,7 @@ def __init__(
12391239 timeout : float = 10.00 ,
12401240 dockerContainer : Optional [str ] = None ,
12411241 dockerExtraArgs : Optional [list ] = None ,
1242- dockerOpenModelicaPath : str = "omc" ,
1242+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
12431243 dockerNetwork : Optional [str ] = None ,
12441244 port : Optional [int ] = None ,
12451245 ) -> None :
@@ -1290,7 +1290,7 @@ def _docker_omc_cmd(self, omc_path_and_args_list) -> list:
12901290 "--user" , str (self ._getuid ()),
12911291 ]
12921292 + self ._dockerExtraArgs
1293- + [self ._dockerCid , self ._dockerOpenModelicaPath ]
1293+ + [self ._dockerCid , self ._dockerOpenModelicaPath . as_posix () ]
12941294 + omc_path_and_args_list
12951295 + extraFlags )
12961296
0 commit comments