diff --git a/pyzkaccess/cli.py b/pyzkaccess/cli.py index 4326135..bbc5f07 100644 --- a/pyzkaccess/cli.py +++ b/pyzkaccess/cli.py @@ -1237,7 +1237,13 @@ def change_ip(self, mac_address: str, new_ip: str, *, broadcast_address: str = " broadcast_address: broadcast network address to send broadcast packets to. Default: 255.255.255.255 """ - ZKAccess.change_ip(self._parse_mac(mac_address), self._parse_ip(new_ip), self._parse_ip(broadcast_address), ChangeIPProtocol.udp, self._dllpath) + ZKAccess.change_ip( + self._parse_mac(mac_address), + self._parse_ip(new_ip), + self._parse_ip(broadcast_address), + ChangeIPProtocol.udp, + self._dllpath, + ) @staticmethod def _parse_ip(value: Any) -> str: @@ -1253,7 +1259,7 @@ def _parse_ip(value: Any) -> str: @staticmethod def _parse_mac(value: Any) -> str: if not isinstance(value, str): - raise ValueError("Bad MAC address") + raise FireError("Bad MAC address") if not re.match(r"^[0-9a-fA-F]{2}([:-]?[0-9a-fA-F]{2}){5}$", value): raise FireError(f"Bad MAC address '{value}'")