massage unifi

This commit is contained in:
Nicholas St. Germain 2019-03-11 19:37:29 -05:00
parent d710d2c621
commit f48bfa1193
2 changed files with 7 additions and 2 deletions

View file

@ -24,7 +24,7 @@ class UniFiAPI(object):
req = self.session.prepare_request(Request('POST', self.server.url + endpoint, json=pre_cookies))
post = connection_handler(self.session, req, self.server.verify_ssl, as_is_reply=True)
if not post.cookies.get('unifises'):
if not post or not post.cookies.get('unifises'):
return
cookies = {'unifises': post.cookies.get('unifises')}