CC-3336: Refactor schedule API used by pypo
This commit is contained in:
parent
a53d856e8d
commit
11f31effca
4 changed files with 222 additions and 299 deletions
|
@ -261,15 +261,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