From 3eb95e09a204148a821f1ca562515971748e46c0 Mon Sep 17 00:00:00 2001 From: fdev31 Date: Thu, 27 Apr 2023 23:57:53 +0200 Subject: [PATCH] log failed requests in DEBUG mode --- pyprland/ipc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyprland/ipc.py b/pyprland/ipc.py index fa1c58c..d6fd434 100644 --- a/pyprland/ipc.py +++ b/pyprland/ipc.py @@ -43,7 +43,10 @@ async def hyprctl(command): await ctl_writer.wait_closed() if DEBUG: print("<<<", resp) - return resp == b"ok" * (len(resp) // 2) + r = resp == b"ok" * (len(resp) // 2) + if DEBUG and not r: + print(f"FAILED {resp}") + return r async def get_focused_monitor_props():