Prevent accessing list index when no device is available

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent b5f9eb7e
......@@ -302,6 +302,8 @@ class XEP_0384(BasePlugin):
self._store_device_ids(bare_jid, items)
items = list(items)
device_ids = []
if items:
device_ids = [int(d['id']) for d in items[0]['devices']]
if bare_jid == self.xmpp.boundjid.bare and \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment