301
301
if response.status not in (200, 201):
302
302
raise errors.InvalidHttpResponse(path, response.text)
303
303
# The response should be valid JSON, but let's ignore it
305
305
# Spin and wait until import_status for new project
307
307
deadline = time.time() + timeout
312
309
mutter('import status is %s', project['import_status'])
313
310
if time.time() > deadline:
314
311
raise Exception('timeout waiting for project to become available')
317
316
def _get_logged_in_username(self):
318
317
return self._current_user['username']