[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):
|
||||||
|
try:
|
||||||
xkb = XKeyboard()
|
xkb = XKeyboard()
|
||||||
log.debug("group num: {}".format(xkb.group_num))
|
log.debug("group num: {}".format(xkb.group_num))
|
||||||
return "{} ({})".format(xkb.group_symbol, xkb.group_variant) if xkb.group_variant else xkb.group_symbol
|
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