Fixed api_get_status
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
f872846244
commit
f36c656e0e
1 changed files with 2 additions and 2 deletions
|
@ -219,9 +219,9 @@ def api_get_status(name, api, api_token):
|
||||||
try:
|
try:
|
||||||
match = re.match(r"[ew]\d{3}[ns]\d{2}", name)
|
match = re.match(r"[ew]\d{3}[ns]\d{2}", name)
|
||||||
if match != None:
|
if match != None:
|
||||||
response = requests.post(api, data={'auth': token, 'action': 'status', 'area': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"})
|
response = requests.post(api, data={'auth': api_token, 'action': 'status', 'area': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"})
|
||||||
else:
|
else:
|
||||||
response = requests.post(api, data={'auth': token, 'action': 'status', 'tile': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"})
|
response = requests.post(api, data={'auth': api_token, 'action': 'status', 'tile': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"})
|
||||||
if response.ok and response.json()["success"] == True:
|
if response.ok and response.json()["success"] == True:
|
||||||
match = re.match(r"pending|done|rebuild|skip|started|packaged", response.json()["status"])
|
match = re.match(r"pending|done|rebuild|skip|started|packaged", response.json()["status"])
|
||||||
if match != None:
|
if match != None:
|
||||||
|
|
Loading…
Reference in a new issue