@@ -523,7 +523,7 @@ class OMCProcessLocal(OMCProcess):
523
523
def __init__ (
524
524
self ,
525
525
timeout : float = 10.00 ,
526
- omhome : Optional [str ] = None ,
526
+ omhome : Optional [str | os . PathLike ] = None ,
527
527
) -> None :
528
528
529
529
super ().__init__ (timeout = timeout )
@@ -536,7 +536,7 @@ def __init__(
536
536
self ._omc_port = self ._omc_port_get ()
537
537
538
538
@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 :
540
540
# use the provided path
541
541
if omhome is not None :
542
542
return pathlib .Path (omhome )
@@ -605,7 +605,7 @@ def __init__(
605
605
self ,
606
606
timeout : float = 10.00 ,
607
607
dockerExtraArgs : Optional [list ] = None ,
608
- dockerOpenModelicaPath : str = "omc" ,
608
+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
609
609
dockerNetwork : Optional [str ] = None ,
610
610
port : Optional [int ] = None ,
611
611
) -> None :
@@ -615,7 +615,7 @@ def __init__(
615
615
dockerExtraArgs = []
616
616
617
617
self ._dockerExtraArgs = dockerExtraArgs
618
- self ._dockerOpenModelicaPath = dockerOpenModelicaPath
618
+ self ._dockerOpenModelicaPath = pathlib . PurePosixPath ( dockerOpenModelicaPath )
619
619
self ._dockerNetwork = dockerNetwork
620
620
621
621
self ._interactivePort = port
@@ -712,7 +712,7 @@ def __init__(
712
712
timeout : float = 10.00 ,
713
713
docker : Optional [str ] = None ,
714
714
dockerExtraArgs : Optional [list ] = None ,
715
- dockerOpenModelicaPath : str = "omc" ,
715
+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
716
716
dockerNetwork : Optional [str ] = None ,
717
717
port : Optional [int ] = None ,
718
718
) -> None :
@@ -796,7 +796,7 @@ def _docker_omc_cmd(
796
796
]
797
797
+ self ._dockerExtraArgs
798
798
+ dockerNetworkStr
799
- + [self ._docker , self ._dockerOpenModelicaPath ]
799
+ + [self ._docker , self ._dockerOpenModelicaPath . as_posix () ]
800
800
+ omc_path_and_args_list
801
801
+ extraFlags )
802
802
@@ -853,7 +853,7 @@ def __init__(
853
853
timeout : float = 10.00 ,
854
854
dockerContainer : Optional [str ] = None ,
855
855
dockerExtraArgs : Optional [list ] = None ,
856
- dockerOpenModelicaPath : str = "omc" ,
856
+ dockerOpenModelicaPath : str | os . PathLike = "omc" ,
857
857
dockerNetwork : Optional [str ] = None ,
858
858
port : Optional [int ] = None ,
859
859
) -> None :
@@ -904,7 +904,7 @@ def _docker_omc_cmd(self, omc_path_and_args_list) -> list:
904
904
"--user" , str (self ._getuid ()),
905
905
]
906
906
+ self ._dockerExtraArgs
907
- + [self ._dockerCid , self ._dockerOpenModelicaPath ]
907
+ + [self ._dockerCid , self ._dockerOpenModelicaPath . as_posix () ]
908
908
+ omc_path_and_args_list
909
909
+ extraFlags )
910
910
0 commit comments