Navigation Menu

Skip to content

Commit

Permalink
do not fail if keyboard layout unknown; fix #25
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianVollmer committed Aug 22, 2018
1 parent 09a6267 commit a53c699
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion seth/parsing.py
Expand Up @@ -441,8 +441,11 @@ def print_var(k, vars):
# elif k == "server_challenge":
# result = b"Server Challenge: %s" % hexlify(vars[k])
elif k == "keyboard_layout":
result = b"Keyboard Layout: 0x%x (%s)" % (vars[k],
try:
result = b"Keyboard Layout: 0x%x (%s)" % (vars[k],
KBD_LAYOUT_CNTRY[vars[k]])
except KeyError:
result = b"Keyboard Layout not recognized"
else:
try:
result = b"%s: %s" % (k.encode(), str(vars[k]).encode)
Expand Down

0 comments on commit a53c699

Please sign in to comment.