From 1f4eeb50c14cd8e096ddee7e8c3f11fc4c215aea Mon Sep 17 00:00:00 2001 From: joel5vega Date: Fri, 19 Jan 2024 18:52:47 -0400 Subject: [PATCH] fixed rebase --- src/sugar/core.py | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/src/sugar/core.py b/src/sugar/core.py index 03e2c20..2e920d2 100644 --- a/src/sugar/core.py +++ b/src/sugar/core.py @@ -118,7 +118,6 @@ def _call_compose_app( def _check_config_file(self): return Path(self.config_file).exists() -<<<<<<< HEAD # Check if services item is given def _check_services_item(self): return bool(self.config.get('services')) @@ -142,27 +141,6 @@ def _set_default_group(self): self.config_group = self.config['groups']['main'] del self.config['services'] -======= - #Check if services item is given - def _check_services_item(self): - return bool(self.config.get('services')) -<<<<<<< HEAD - ->>>>>>> add flag function to check if service is present -======= - - # set default group main - def _set_default_group(self): - #must set the default group - self.config_data["groups"] = { - "main": self.config_data["services"] - } - self.config_group = self.config_data["groups"]["main"] - del self.config_data["services"] - - return - ->>>>>>> fixed conditional and added constructor def _filter_service_group(self): groups = self.config['groups'] @@ -246,27 +224,6 @@ def _load_compose_app(self): self.compose_args.append('compose') def _load_compose_args(self): -<<<<<<< HEAD - self._filter_service_group() -======= - #check if either services or groups are present - if not (self.config.get('services') and self.config.get('groups')): - KxgrLogs.raise_error( - f'either `services` OR `groups` flag must be given', - KxgrErrorType.KXGR_INVALID_CONFIGURATION, - ) - #check if both services and groups are present - if self.config.get('services') and self.config.get('groups'): - KxgrLogs.raise_error( - f'`services` and `groups` flag given. Just use one of them is allowed.', - KxgrErrorType.KXGR_INVALID_CONFIGURATION, - ) - if self.config.get('services'): - self._set_default_group() - else: - self._filter_service_group() ->>>>>>> fixed conditional and added constructor - if 'env-file' in self.service_group: self.compose_args.extend( ['--env-file', self.service_group['env-file']]