[modules/vpn] Fix tests
Add a guard in case nmcli is not installed or does not return anything.
This commit is contained in:
parent
bf57496093
commit
71d80ded40
1 changed files with 5 additions and 2 deletions
|
@ -35,8 +35,11 @@ class Module(bumblebee.engine.Module):
|
||||||
self._vpn_profiles = []
|
self._vpn_profiles = []
|
||||||
for line in lines:
|
for line in lines:
|
||||||
info = line.split(':')
|
info = line.split(':')
|
||||||
|
try:
|
||||||
if info[1] == "vpn":
|
if info[1] == "vpn":
|
||||||
self._vpn_profiles.append(info[0])
|
self._vpn_profiles.append(info[0])
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
|
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
|
||||||
cmd=self.popup)
|
cmd=self.popup)
|
||||||
|
|
Loading…
Reference in a new issue