Skip to content
This repository was archived by the owner on Aug 19, 2018. It is now read-only.

Commit 50fd805

Browse files
committed
Merge branch 'master' of https://github.com/grokkers/cr-async
2 parents 28e602e + 0935163 commit 50fd805

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crasync/core.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ async def get_profile(self, *, tags):
3131
data = await resp.json()
3232
else:
3333
raise ConnectionError(f'API not responding: {resp.status}')
34+
35+
if "error" in data:
36+
return None
3437

3538
if isinstance(data, list):
3639
return [Profile(self, c) for c in data]
@@ -49,6 +52,9 @@ async def get_clan(self, *tags):
4952
data = await resp.json()
5053
else:
5154
raise ConnectionError(f'API not responding: {resp.status}')
55+
56+
if "error" in data:
57+
return None
5258

5359
if isinstance(data, list):
5460
return [Clan(self, c) for c in data]

0 commit comments

Comments
 (0)