Fix GetAccountResp data parsing
This commit is contained in:
parent
5d8affbb5f
commit
c63ecf7781
@ -44,9 +44,10 @@ class OMMClient2:
|
|||||||
:param id: User id
|
:param id: User id
|
||||||
"""
|
"""
|
||||||
|
|
||||||
r = self.session.request(message.GetAccount(id))
|
r = self.session.request(messages.GetAccount(id))
|
||||||
r.raise_on_error()
|
r.raise_on_error()
|
||||||
|
if r.account is None:
|
||||||
|
return None
|
||||||
return r.account[0]
|
return r.account[0]
|
||||||
|
|
||||||
def ping(self):
|
def ping(self):
|
||||||
|
@ -24,4 +24,4 @@ class GetAccount(Request):
|
|||||||
class GetAccountResp(Response):
|
class GetAccountResp(Response):
|
||||||
@property
|
@property
|
||||||
def account(self):
|
def account(self):
|
||||||
return self.attrs.get("account")
|
return self.childs.get("account")
|
||||||
|
Loading…
Reference in New Issue
Block a user