2021.4.post1 #31

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

View File

@ -285,7 +285,7 @@ class Configuration(ConfigurationABC):
exit() exit()
def add_json_file(self, name: str, optional: bool = None, output: bool = True, path: str = None): def add_json_file(self, name: str, optional: bool = None, output: bool = True, path: str = None):
path_root = self._application_environment.content_root_path path_root = self._application_environment.working_directory
if path is not None: if path is not None:
path_root = path path_root = path

View File

@ -9,18 +9,16 @@ from cpl.environment.environment_name_enum import EnvironmentNameEnum
class ApplicationEnvironment(ApplicationEnvironmentABC): class ApplicationEnvironment(ApplicationEnvironmentABC):
def __init__(self, name: EnvironmentNameEnum = EnvironmentNameEnum.production, crp: str = './'): def __init__(self, name: EnvironmentNameEnum = EnvironmentNameEnum.production):
""" """
Represents environment of the application Represents environment of the application
:param name: :param name:
:param crp:
""" """
ApplicationEnvironmentABC.__init__(self) ApplicationEnvironmentABC.__init__(self)
self._environment_name: Optional[EnvironmentNameEnum] = name self._environment_name: Optional[EnvironmentNameEnum] = name
self._app_name: Optional[str] = None self._app_name: Optional[str] = None
self._customer: Optional[str] = None self._customer: Optional[str] = None
self._content_root_path: Optional[str] = crp
self._start_time: datetime = datetime.now() self._start_time: datetime = datetime.now()
self._end_time: datetime = datetime.now() self._end_time: datetime = datetime.now()
@ -51,14 +49,6 @@ class ApplicationEnvironment(ApplicationEnvironmentABC):
def customer(self, customer: str): def customer(self, customer: str):
self._customer = customer self._customer = customer
@property
def content_root_path(self) -> str:
return self._content_root_path
@content_root_path.setter
def content_root_path(self, content_root_path: str):
self._content_root_path = content_root_path
@property @property
def host_name(self): def host_name(self):
return gethostname() return gethostname()

View File

@ -35,14 +35,6 @@ class ApplicationEnvironmentABC(ABC):
@abstractmethod @abstractmethod
def customer(self, customer: str): pass def customer(self, customer: str): pass
@property
@abstractmethod
def content_root_path(self) -> str: pass
@content_root_path.setter
@abstractmethod
def content_root_path(self, content_root_path: str): pass
@property @property
@abstractmethod @abstractmethod
def host_name(self) -> str: pass def host_name(self) -> str: pass