mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-05-04 19:39:50 +02:00
build
This commit is contained in:
+1
-1
@@ -180,7 +180,7 @@ class PortainerApi:
|
|||||||
def _api_get(self, path, timeout=120):
|
def _api_get(self, path, timeout=120):
|
||||||
url = f"{self.base_url.rstrip('/')}{path}"
|
url = f"{self.base_url.rstrip('/')}{path}"
|
||||||
headers = {"X-API-Key": f"{self.token}"}
|
headers = {"X-API-Key": f"{self.token}"}
|
||||||
resp = requests.get(url, headers=headers, timeout=timeout)
|
resp = requests.get(url, headers=headers, timeout=120)
|
||||||
if resp.status_code != 200:
|
if resp.status_code != 200:
|
||||||
return resp.status_code
|
return resp.status_code
|
||||||
print(f"Error: {resp.status_code} - {resp.text}")
|
print(f"Error: {resp.status_code} - {resp.text}")
|
||||||
|
|||||||
Reference in New Issue
Block a user