Make sure it's a Contacts before accessing fields

This commit is contained in:
Dan 2018-02-22 11:03:48 +01:00
parent cfa19bc1c8
commit 28f10bd042

View File

@ -2412,6 +2412,8 @@ class Client:
time.sleep(e.x) time.sleep(e.x)
continue continue
else: else:
log.info("Contacts count: {}".format(len(contacts.users))) if isinstance(contacts, types.contacts.Contacts):
self.fetch_peers(contacts.users) log.info("Contacts count: {}".format(len(contacts.users)))
self.fetch_peers(contacts.users)
return contacts return contacts