Skip to content
Merged
Changes from all 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_bluefruit_connect/button_packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def __init__(self, button, pressed):
# This check will catch wrong length and also non-sequence args (like an int).
try:
assert len(button) == 1
except:
raise ValueError("Button must be a single char or byte.")
except Exception as err:
raise ValueError("Button must be a single char or byte.") from err

self._button = button
self._pressed = pressed
Expand Down