From 9ab02cb92bad63d1ed62f753628442d07ddfa580 Mon Sep 17 00:00:00 2001 From: Elin Angelov Date: Mon, 21 Aug 2017 10:37:38 +0300 Subject: [PATCH] fix: exception occurred when screen is locked --- bumblebee/modules/amixer.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bumblebee/modules/amixer.py b/bumblebee/modules/amixer.py index fa08ec3..2ac6c89 100644 --- a/bumblebee/modules/amixer.py +++ b/bumblebee/modules/amixer.py @@ -28,7 +28,13 @@ class Module(bumblebee.engine.Module): return "0%" def update(self, widgets): - self._level = bumblebee.util.execute(self._cmdString) + level = "" + try: + level = bumblebee.util.execute(self._cmdString) + except Exception as e: + level = "" + + self._level = level def state(self, widget): if self._muted: