From 8f44a1bf638ad5ef5fa16825cc676ea14ee79285 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Mon, 1 Jan 2018 08:59:21 +0100 Subject: [PATCH] [modules/redshift] Do not block status line Redshift might block when no network connectivity is available (if it tries to determine the location automatically). To avoid this blocking the whole status line, immediately release the lock in the query thread. --- bumblebee/modules/redshift.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/redshift.py b/bumblebee/modules/redshift.py index 058c9b5..a60edbc 100644 --- a/bumblebee/modules/redshift.py +++ b/bumblebee/modules/redshift.py @@ -29,6 +29,7 @@ def get_redshift_value(widget): except RuntimeError: continue break + widget.get("condition").release() try: res = bumblebee.util.execute("redshift -p") @@ -48,7 +49,6 @@ def get_redshift_value(widget): else: widget.set("state", "transition") widget.set("transition", " ".join(line.split(" ")[2:])) - widget.get("condition").release() class Module(bumblebee.engine.Module): def __init__(self, engine, config):