keyboardlayouteditor

[Fork] Archive of the keyboard layout editor.
git clone https://git.jojolepro.com/keyboardlayouteditor.git
Log | Files | Refs | README | LICENSE

commit 6cd401f436eceb352b39d525d4a5b864c8bcdc5e
parent a2a331e91216092c3d501853aa87315d4c23e52a
Author: simos.lists <simos.lists@70737e48-4f4a-0410-8df8-290828ad50c4>
Date:   Tue, 30 Sep 2008 15:56:50 +0000

Handle AttributeError exception, when settings TOKEN_KEY

git-svn-id: http://keyboardlayouteditor.googlecode.com/svn/trunk@67 70737e48-4f4a-0410-8df8-290828ad50c4

Diffstat:
MKeyboardLayoutEditor/src/ParseXKB.py | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/KeyboardLayoutEditor/src/ParseXKB.py b/KeyboardLayoutEditor/src/ParseXKB.py @@ -258,7 +258,10 @@ class ParseXKB: # sys.exit(-1) allkeysymgroups = {} for keyset in self.getChildrenByType(mapobject, TOKEN_KEY): - allkeysymgroups[keyset.getChild(0).getChild(0).getText()] = keyset + try: + allkeysymgroups[keyset.getChild(0).getChild(0).getText()] = keyset + except AttributeError: + print "Error setting keyset:", keyset sortedkeysymgroups = self.sortDict(allkeysymgroups, KeycodesReader.compare_keycode) for keyset in sortedkeysymgroups: elem_keysymgroup = self.getChildrenByType(keyset, ELEM_KEYSYMGROUP) @@ -507,4 +510,4 @@ if __name__ == '__main__': print k, for i in store_keydict[k].keys(): print store_keydict[k][i].getValue(), - print- \ No newline at end of file + print