Mercurial > libervia-pubsub
comparison sat_pubsub/backend.py @ 471:ed9e12701e0f
backend: return empty roster when `NotAllowedError` is raised in `getOwnerRoster`:
No error is logged either, this case can happen often is roster permission is not granted.
fix 390
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 21 Oct 2021 17:31:01 +0200 |
parents | d86e0f8a1405 |
children | b544109ab4c4 |
comparison
equal
deleted
inserted
replaced
470:a549c8e17827 | 471:ed9e12701e0f |
---|---|
1088 | 1088 |
1089 owner_jid = owners[0] | 1089 owner_jid = owners[0] |
1090 | 1090 |
1091 try: | 1091 try: |
1092 roster = await self.privilege.getRoster(owner_jid) | 1092 roster = await self.privilege.getRoster(owner_jid) |
1093 except error.NotAllowedError: | |
1094 return | |
1093 except Exception as e: | 1095 except Exception as e: |
1094 log.msg("Error while getting roster of {owner_jid}: {msg}".format( | 1096 log.msg("Error while getting roster of {owner_jid}: {msg}".format( |
1095 owner_jid = owner_jid.full(), | 1097 owner_jid = owner_jid.full(), |
1096 msg = e)) | 1098 msg = e)) |
1097 return | 1099 return |