mirror of
https://github.com/opencultureconsulting/openrefine-client.git
synced 2025-02-16 00:00:07 +01:00
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…
x
Reference in New Issue
Block a user