Bugfix: --addr assert checking (#51)

This commit is contained in:
bliepp
2026-03-16 00:27:54 +03:00
committed by GitHub
parent be39f68c16
commit 35c41a705c
+1 -1
View File
@@ -65,7 +65,7 @@ def print_cmd(model, conn, addr, density, rotate, image, verbose):
) )
if conn == "bluetooth": if conn == "bluetooth":
assert conn is not None, "--addr argument required for bluetooth connection" assert addr is not None, "--addr argument required for bluetooth connection"
addr = addr.upper() addr = addr.upper()
assert re.fullmatch(r"([0-9A-F]{2}:){5}([0-9A-F]{2})", addr), "Bad MAC address" assert re.fullmatch(r"([0-9A-F]{2}:){5}([0-9A-F]{2})", addr), "Bad MAC address"
transport = BluetoothTransport(addr) transport = BluetoothTransport(addr)