Skip to content

Commit

Permalink
Fix config set order
Browse files Browse the repository at this point in the history
  • Loading branch information
Dramelac committed Feb 27, 2024
1 parent 4b52c55 commit debcde2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions exegol/model/ContainerConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ def __init__(self, container: Optional[Container] = None, container_name: Option
"""Container config default value"""
self.container_name: Optional[str] = container_name if (container_name is None) ^ \
(container_name is not None and container_name.startswith("exegol-")) else f'exegol-{container_name}'
if hostname is not None:
self.hostname = hostname
if container is None: # if this is a new container
self.addEnv(ContainerConfig.ExegolEnv.exegol_name.value, container_name)
else:
self.hostname = self.container_name if self.container_name is not None else ""
self.__enable_gui: bool = False
self.__share_timezone: bool = False
self.__my_resources: bool = False
Expand Down Expand Up @@ -125,6 +119,13 @@ def __init__(self, container: Optional[Container] = None, container_name: Option
self.__comment: Optional[str] = None
self.__username: str = "root"
self.__passwd: Optional[str] = self.generateRandomPassword()
if hostname is not None:
self.hostname = hostname
if container is None: # if this is a new container
self.addEnv(ContainerConfig.ExegolEnv.exegol_name.value, container_name)
else:
self.hostname = self.container_name if self.container_name is not None else ""


if container is not None:
self.__parseContainerConfig(container)
Expand Down

0 comments on commit debcde2

Please sign in to comment.