[modules/layout-xkb] Ignore errors
This commit is contained in:
parent
9525b18653
commit
0dd8a4ffeb
1 changed files with 6 additions and 3 deletions
|
@ -35,8 +35,11 @@ class Module(bumblebee.engine.Module):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def current_layout(self, widget):
|
def current_layout(self, widget):
|
||||||
xkb = XKeyboard()
|
try:
|
||||||
log.debug("group num: {}".format(xkb.group_num))
|
xkb = XKeyboard()
|
||||||
return "{} ({})".format(xkb.group_symbol, xkb.group_variant) if xkb.group_variant else xkb.group_symbol
|
log.debug("group num: {}".format(xkb.group_num))
|
||||||
|
return "{} ({})".format(xkb.group_symbol, xkb.group_variant) if xkb.group_variant else xkb.group_symbol
|
||||||
|
except Exception:
|
||||||
|
return "n/a"
|
||||||
|
|
||||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||||
|
|
Loading…
Reference in a new issue