Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should fix raise-missing-from failure #13

Merged
merged 3 commits into from
Jan 12, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adafruit_hue.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ def discover_bridge(self):
json_data = resp.json()
bridge_ip = json_data[0]["internalipaddress"]
resp.close()
except:
except Exception as e:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be except TypeError as e:? I feel like that's what I've seen previous, but I could be mistaken.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kattni I'm not really sure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with it as it is then, as long as we can get it passing.

raise TypeError(
"Ensure the Philips Bridge and CircuitPython device\
are both on the same WiFi network."
)
) from e
self._ip = bridge_ip
# set up hue bridge address path
self._bridge_url = "http://{}/api".format(self._ip)
Expand Down