Add a nicer assertion for addresses
This commit is contained in:
parent
9b8ba82d54
commit
07e27e225d
1 changed files with 1 additions and 0 deletions
|
@ -13,6 +13,7 @@ DEFAULT_MARGIN = 60
|
|||
|
||||
async def get_client_props_by_address(addr: str):
|
||||
"Returns client properties given its address"
|
||||
assert len(addr) > 2, "Client address is invalid"
|
||||
for client in await hyprctlJSON("clients"):
|
||||
assert isinstance(client, dict)
|
||||
if client.get("address") == addr:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue