From 07e27e225dc7421551083df2ee58f737587aa0d9 Mon Sep 17 00:00:00 2001 From: fdev31 Date: Sun, 15 Oct 2023 23:16:40 +0200 Subject: [PATCH] Add a nicer assertion for addresses --- pyprland/plugins/scratchpads.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyprland/plugins/scratchpads.py b/pyprland/plugins/scratchpads.py index 43ff936..f05d6de 100644 --- a/pyprland/plugins/scratchpads.py +++ b/pyprland/plugins/scratchpads.py @@ -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: