@@ -523,7 +523,7 @@ class OMCProcessLocal(OMCProcess):
523523 def __init__ (
524524 self ,
525525 timeout : float = 10.00 ,
526- omhome : Optional [str ] = None ,
526+ omhome : Optional [str | os . PathLike ] = None ,
527527 ) -> None :
528528
529529 super ().__init__ (timeout = timeout )
@@ -536,7 +536,7 @@ def __init__(
536536 self ._omc_port = self ._omc_port_get ()
537537
538538 @staticmethod
539- def _omc_home_get (omhome : Optional [str ] = None ) -> pathlib .Path :
539+ def _omc_home_get (omhome : Optional [str | os . PathLike ] = None ) -> pathlib .Path :
540540 # use the provided path
541541 if omhome is not None :
542542 return pathlib .Path (omhome )
@@ -605,7 +605,7 @@ def __init__(
605605 self ,
606606 timeout : float = 10.00 ,
607607 dockerExtraArgs : Optional [list ] = None ,
608- dockerOpenModelicaPath : str = "omc" ,
608+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
609609 dockerNetwork : Optional [str ] = None ,
610610 port : Optional [int ] = None ,
611611 ) -> None :
@@ -615,7 +615,7 @@ def __init__(
615615 dockerExtraArgs = []
616616
617617 self ._dockerExtraArgs = dockerExtraArgs
618- self ._dockerOpenModelicaPath = dockerOpenModelicaPath
618+ self ._dockerOpenModelicaPath = pathlib . PurePosixPath ( dockerOpenModelicaPath )
619619 self ._dockerNetwork = dockerNetwork
620620
621621 self ._interactivePort = port
@@ -712,7 +712,7 @@ def __init__(
712712 timeout : float = 10.00 ,
713713 docker : Optional [str ] = None ,
714714 dockerExtraArgs : Optional [list ] = None ,
715- dockerOpenModelicaPath : str = "omc" ,
715+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
716716 dockerNetwork : Optional [str ] = None ,
717717 port : Optional [int ] = None ,
718718 ) -> None :
@@ -796,7 +796,7 @@ def _docker_omc_cmd(
796796 ]
797797 + self ._dockerExtraArgs
798798 + dockerNetworkStr
799- + [self ._docker , self ._dockerOpenModelicaPath ]
799+ + [self ._docker , self ._dockerOpenModelicaPath . as_posix () ]
800800 + omc_path_and_args_list
801801 + extraFlags )
802802
@@ -853,7 +853,7 @@ def __init__(
853853 timeout : float = 10.00 ,
854854 dockerContainer : Optional [str ] = None ,
855855 dockerExtraArgs : Optional [list ] = None ,
856- dockerOpenModelicaPath : str = "omc" ,
856+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
857857 dockerNetwork : Optional [str ] = None ,
858858 port : Optional [int ] = None ,
859859 ) -> None :
@@ -904,7 +904,7 @@ def _docker_omc_cmd(self, omc_path_and_args_list) -> list:
904904 "--user" , str (self ._getuid ()),
905905 ]
906906 + self ._dockerExtraArgs
907- + [self ._dockerCid , self ._dockerOpenModelicaPath ]
907+ + [self ._dockerCid , self ._dockerOpenModelicaPath . as_posix () ]
908908 + omc_path_and_args_list
909909 + extraFlags )
910910
0 commit comments