This commit is contained in:
2025-12-13 21:42:38 +01:00
parent 54da7d2764
commit 24492e1ec9
2 changed files with 4 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ class Portainer:
def get_stacks(self, endpoint_id="all", timeout=20): def get_stacks(self, endpoint_id="all", timeout=20):
'''Get a list of stacks for a specific endpoint or all endpoints.''' '''Get a list of stacks for a specific endpoint or all endpoints.'''
if endpoint_id != "all": if endpoint_id != "all":
endpoint_id = self.get_endpoint_id(endpoint_id) endpoint_id = self.get_endpoint_id()
path = "/stacks" path = "/stacks"
stcks = [] stcks = []
stacks = self._api_get(path, timeout=timeout) stacks = self._api_get(path, timeout=timeout)
@@ -603,7 +603,7 @@ class Portainer:
p = "standalone" p = "standalone"
env_path = f"{self.repo_dir}/{stack}/.env" env_path = f"{self.repo_dir}/{stack}/.env"
# input(swarm_id) # input(swarm_id)
self.endpoint_id = self.get_endpoint_id(endpoint) self.endpoint_id = self.get_endpoint_id()
if os.path.exists(self.repo_dir): if os.path.exists(self.repo_dir):
shutil.rmtree(self.repo_dir) shutil.rmtree(self.repo_dir)
else: else:

View File

@@ -475,6 +475,8 @@ if __name__ == "__main__":
if args.action == "create_stack": if args.action == "create_stack":
por.action = "create_stack" por.action = "create_stack"
print(cur_config)
print(args)
args = prompt_missing_args( args = prompt_missing_args(
args, args,
cur_config, cur_config,