[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(':')
|
||||||
if info[1] == "vpn":
|
try:
|
||||||
self._vpn_profiles.append(info[0])
|
if info[1] == "vpn":
|
||||||
|
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