Allow pending as a response
This commit is contained in:
parent
550b3d9f51
commit
92504e0b34
|
@ -76,7 +76,7 @@ class RefineServer(object):
|
|||
def urlopen_json(self, *args, **kwargs):
|
||||
"""Open a Refine URL, optionally POST data, and return parsed JSON."""
|
||||
response = json.loads(self.urlopen(*args, **kwargs).read())
|
||||
if 'code' in response and response['code'] != 'ok':
|
||||
if 'code' in response and response['code'] not in ('ok', 'pending'):
|
||||
raise Exception(
|
||||
response['code'] + ': ' +
|
||||
response.get('message', response.get('stack', response)))
|
||||
|
|
Loading…
Reference in New Issue