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