2021.4.post1 #31

Merged
edraft merged 92 commits from 2021.4.post1 into master 2021-05-19 09:00:40 +02:00
2 changed files with 24 additions and 11 deletions
Showing only changes of commit dc849c4f71 - Show all commits

View File

@ -81,18 +81,22 @@ class ApplicationEnvironment(ApplicationEnvironmentABC):
@property @property
def working_directory(self) -> str: def working_directory(self) -> str:
return self._working_directory return str(self._working_directory)
def set_working_directory(self, path: str = ''):
if path != '':
self._working_directory = path
return
self._working_directory = pathlib.Path().absolute()
@property @property
def runtime_directory(self) -> str: def runtime_directory(self) -> str:
return self._runtime_directory return str(self._runtime_directory)
def set_runtime_directory(self, file: str): def set_runtime_directory(self, runtime_directory: str):
self._runtime_directory = pathlib.Path(file).parent.absolute() if runtime_directory != '':
self._runtime_directory = runtime_directory
return
self._runtime_directory = pathlib.Path().absolute()
def set_working_directory(self, working_directory: str):
if working_directory != '':
self._working_directory = working_directory
return
self._working_directory = pathlib.Path().absolute()

View File

@ -83,3 +83,12 @@ class ApplicationEnvironmentABC(ABC):
:return: :return:
""" """
pass pass
@abstractmethod
def set_working_directory(self, working_directory: str):
"""
Sets the current working directory
:param working_directory:
:return:
"""
pass