jeffreydwalter / arlo

Python module for interacting with Netgear's Arlo camera system.
Apache License 2.0
518 stars 123 forks source link

Issue on Logout() call #57

Closed imopen closed 6 years ago

imopen commented 6 years ago

Hi Jeffrey, I obtain an exception calling a Logout():

[...] File "/root/arlo_autoarm/Arlo.py", line 245, in Logout self.Unsubscribe(basestation_id) File "/root/arlo_autoarm/Arlo.py", line 315, in Unsubscribe basestation_id = basestation.get('deviceId') AttributeError: 'unicode' object has no attribute 'get'

I've fixed it casting the Unsubscribe to a str()

def Logout(self):
    event_streams = self.event_streams.copy()
    print("event_streams.keys():")
    print(event_streams.keys())
    for basestation_id in event_streams.keys():
        self.Unsubscribe(str(basestation_id))
    return self.request.put('https://arlo.netgear.com/hmsweb/logout')

It seems to work but I've used only a piece of intuit, so please double check it.

Thank you, imopen

jeffreydwalter commented 6 years ago

Hi @imopen thanks for reporting this. I just committed a fix and pushed a new release to pypi.