Allow pending as a response

This commit is contained in:
Paul Makepeace 2011-06-09 12:03:15 +00:00
parent 550b3d9f51
commit 92504e0b34
1 changed files with 1 additions and 1 deletions

View File

@ -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)))