xep_0384: Fixup; get check for eligible devices out of the loop

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2018-11-30 17:13:31 +00:00
parent bc85bc7efd
commit a12dad7241

View file

@ -313,8 +313,8 @@ class XEP_0384(BasePlugin):
if not errors:
break
no_eligible_devices = []
for (exn, key, val) in errors:
no_eligible_devices = []
if isinstance(exn, MissingBundleException):
bundle = await self._fetch_bundle(key, val)
@ -338,8 +338,8 @@ class XEP_0384(BasePlugin):
no_eligible_devices.append(key)
if no_eligible_devices:
raise NoEligibleDevices(no_eligible_devices)
if no_eligible_devices:
raise NoEligibleDevices(no_eligible_devices)
break