CC-3336: Refactor schedule API used by pypo
This commit is contained in:
parent
4631e199cc
commit
e8f329aef1
4 changed files with 229 additions and 272 deletions
|
@ -255,15 +255,15 @@ class AirTimeApiClient(ApiClientInterface):
|
|||
export_url = export_url.replace('%%api_key%%', self.config["api_key"])
|
||||
|
||||
response = ""
|
||||
status = 0
|
||||
try:
|
||||
response_json = self.get_response_from_server(export_url)
|
||||
response = json.loads(response_json)
|
||||
status = response['check']
|
||||
success = True
|
||||
except Exception, e:
|
||||
logger.error(e)
|
||||
success = False
|
||||
|
||||
return status, response
|
||||
return success, response
|
||||
|
||||
|
||||
def get_media(self, uri, dst):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue