custom-components / authenticated

A platform which allows you to get information about sucessfull logins to Home Assistant.
MIT License
82 stars 28 forks source link

Fix excluding IPs #54

Closed claytonjn closed 4 years ago

claytonjn commented 4 years ago

Now that everything's in a try block continue doesn't work. Raising an exception was the easiest way to fix the functionality however removing the for loop from the try block and using a separate try block inside the for loop is also an option. Also, noticed a couple typos.

ludeeus commented 4 years ago

Wouldn't this cause it to produce an error?

claytonjn commented 4 years ago

In the log? You have lines 346-347 to just pass on exception and not log anything so I don't think any errors would be exposed to the user. (EDIT: I should clarify - in my testing I'm not seeing any errors. I'm by no means a python pro but as far as I know there shouldn't be any errors produced due the your exception handling)

Like I said, this was just the easiest fix without changing any of your logic. If you want me to take a different approach that's fine.