From 71d80ded400951ed993ea4fdf3a4c8b2d190deab Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Fri, 14 Jun 2019 20:09:03 +0200 Subject: [PATCH] [modules/vpn] Fix tests Add a guard in case nmcli is not installed or does not return anything. --- bumblebee/modules/vpn.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bumblebee/modules/vpn.py b/bumblebee/modules/vpn.py index 149e547..a26586b 100644 --- a/bumblebee/modules/vpn.py +++ b/bumblebee/modules/vpn.py @@ -35,8 +35,11 @@ class Module(bumblebee.engine.Module): self._vpn_profiles = [] for line in lines: info = line.split(':') - if info[1] == "vpn": - self._vpn_profiles.append(info[0]) + try: + if info[1] == "vpn": + self._vpn_profiles.append(info[0]) + except: + pass engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, cmd=self.popup)