Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Ongoing

- PR [321](https://github.com/plugwise/python-plugwise-usb/pull/321): Catch error reported in Issue [#312](https://github.com/plugwise/plugwise_usb-beta/issues/312)
- PR [319](https://github.com/plugwise/python-plugwise-usb/pull/319): Replace unclear warning message when a node is not online, also various small improvements suggested by CRAI.
- PR [312](https://github.com/plugwise/python-plugwise-usb/pull/312): properly propagate configuration changes and initialize to available on first node wakeup

Expand Down
6 changes: 5 additions & 1 deletion plugwise_usb/helpers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@

def validate_mac(mac: str) -> bool:
"""Validate the supplied string is in a MAC address format."""
if not re.match("^[A-F0-9]+$", mac):
try:
if not re.match("^[A-F0-9]+$", mac):
return False
except TypeError:
return False

try:
_ = int(mac, 16)
except ValueError:
Expand Down