From 9b8ba82d545c4d8c3162228861703f7a44359aa4 Mon Sep 17 00:00:00 2001 From: fdev31 Date: Sun, 15 Oct 2023 22:50:54 +0200 Subject: [PATCH] monitors plugin: don't fail if monitor is unknown --- pyprland/plugins/monitors.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyprland/plugins/monitors.py b/pyprland/plugins/monitors.py index a047132..d40b753 100644 --- a/pyprland/plugins/monitors.py +++ b/pyprland/plugins/monitors.py @@ -82,7 +82,10 @@ class Extension(Plugin): # pylint: disable=missing-class-docstring for mon_pattern, conf in self.config["placement"].items(): if mon_pattern in mon_description: for placement, other_mon_description in conf.items(): - ref = mon_by_name[other_mon_description] + try: + ref = mon_by_name[other_mon_description] + except KeyError: + continue if ref: place = placement.lower() x: int = 0