From 42329178150fafa3bc59ae6e1fcf52ea46f810a9 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 3 Feb 2015 19:59:48 +0100 Subject: [PATCH] deal with xbacklight returning an error code --- dsl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dsl.py b/dsl.py index 2b677bf..707a5c0 100755 --- a/dsl.py +++ b/dsl.py @@ -264,6 +264,8 @@ if __name__ == "__main__": subprocess.check_call(["xbacklight", "-set", "100"]) except FileNotFoundError: print("xbacklight has not been found, unable to turn your laptop backlight on.") + except subprocess.CalledProcessError: + print("xbacklight returned an error while attempting to turn your laptop backlight on.") except Exception as e: frontend.error(str(e)) raise -- 2.30.2