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):
'''Get a list of stacks for a specific endpoint or all endpoints.'''
if endpoint_id != "all":
endpoint_id = self.get_endpoint_id(endpoint_id)
endpoint_id = self.get_endpoint_id()
path = "/stacks"
stcks = []
stacks = self._api_get(path, timeout=timeout)
@@ -603,7 +603,7 @@ class Portainer:
p = "standalone"
env_path = f"{self.repo_dir}/{stack}/.env"
# 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):
shutil.rmtree(self.repo_dir)
else: