CLI: don't fail when calling getContacts with a component profile
This commit is contained in:
parent
0114769fa4
commit
da7a90abd2
1 changed files with 11 additions and 1 deletions
|
|
@ -801,7 +801,17 @@ class LiberviaCli:
|
|||
names2jid = {}
|
||||
nodes2jid = {}
|
||||
|
||||
for contact in await self.bridge.getContacts(self.profile):
|
||||
try:
|
||||
contacts = await self.bridge.getContacts(self.profile)
|
||||
except BridgeException as e:
|
||||
if e.classname == "AttributeError":
|
||||
# we may get an AttributeError if we use a component profile
|
||||
# as components don't have roster
|
||||
contacts = []
|
||||
else:
|
||||
raise e
|
||||
|
||||
for contact in contacts:
|
||||
jid_s, attr, groups = contact
|
||||
_jid = JID(jid_s)
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue