|
|
@@ -193,6 +193,10 @@ def wait_for_query_to_finish(client, response, max=60.0):
|
|
|
return response
|
|
|
|
|
|
content = json.loads(response.content)
|
|
|
+
|
|
|
+ if content.get('status') == -1:
|
|
|
+ raise Exception('Query failed: %s' % content.get('message'))
|
|
|
+
|
|
|
watch_url = content['watch_url']
|
|
|
|
|
|
response = client.get(watch_url, follow=True)
|
|
|
@@ -208,6 +212,11 @@ def wait_for_query_to_finish(client, response, max=60.0):
|
|
|
|
|
|
response = client.get(watch_url, follow=True)
|
|
|
|
|
|
+ content = json.loads(response.content)
|
|
|
+
|
|
|
+ if content.get('status') == -1:
|
|
|
+ raise Exception('Query failed: %s' % content.get('message'))
|
|
|
+
|
|
|
return response
|
|
|
|
|
|
|