File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -456,16 +456,13 @@ def __init__(
456456 self ._currentUser = "nobody"
457457
458458 # omc port and log file
459- if sys .platform == 'win32' :
460- self ._omc_file_port = f"openmodelica.port.{ self ._random_string } "
461- else :
462- self ._omc_file_port = f"openmodelica.{ self ._currentUser } .port.{ self ._random_string } "
459+ self ._omc_filebase = f"openmodelica.{ self ._random_string } "
463460
464461 # get a temporary directory
465462 self ._temp_dir = pathlib .Path (tempfile .gettempdir ())
466463
467464 # setup log file - this file must be closed in the destructor
468- logfile = self ._temp_dir / (self ._omc_file_port + '.log' )
465+ logfile = self ._temp_dir / (self ._omc_filebase + '.log' )
469466 self ._omc_loghandle : Optional [io .TextIOWrapper ] = None
470467 try :
471468 self ._omc_loghandle = open (file = logfile , mode = "w+" , encoding = "utf-8" )
@@ -754,7 +751,7 @@ def _omc_command_docker(self, omc_path_and_args_list) -> list:
754751 raise OMCSessionException (f'dockerNetwork was set to { self ._dockerNetwork } , '
755752 'but only \" host\" or \" separate\" is allowed' )
756753
757- self ._dockerCidFile = self ._temp_dir / (self ._omc_file_port + ".docker.cid" )
754+ self ._dockerCidFile = self ._temp_dir / (self ._omc_filebase + ".docker.cid" )
758755
759756 if isinstance (self ._interactivePort , int ):
760757 extraFlags = extraFlags + [f"--interactivePort={ int (self ._interactivePort )} " ]
You can’t perform that action at this time.
0 commit comments