File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -526,18 +526,17 @@ def omcpath(self, *path) -> OMCPath:
526526
527527 def omcpath_tempdir (self , tempdir_base : Optional [OMCPath ] = None ) -> OMCPath :
528528 """
529- Get a temporary directory using OMC.
529+ Get a temporary directory using OMC. It is our own implementation as non-local usage relies on OMC to run all
530+ filesystem related access.
530531 """
531- # fallback solution for Python < 3.12; a modified pathlib.Path object is used as OMCPath replacement
532- if sys .version_info < (3 , 12 ):
533- tempdir_str = tempfile .gettempdir ()
534- # noinspection PyArgumentList
535- return OMCPath (tempdir_str )
536-
537532 names = [str (uuid .uuid4 ()) for _ in range (100 )]
538533
539534 if tempdir_base is None :
540- tempdir_str = self .sendExpression ("getTempDirectoryPath()" )
535+ # fallback solution for Python < 3.12; a modified pathlib.Path object is used as OMCPath replacement
536+ if sys .version_info < (3 , 12 ):
537+ tempdir_str = tempfile .gettempdir ()
538+ else :
539+ tempdir_str = self .sendExpression ("getTempDirectoryPath()" )
541540 tempdir_base = self .omcpath (tempdir_str )
542541
543542 tempdir : Optional [OMCPath ] = None
You can’t perform that action at this time.
0 commit comments