Skip to content

Commit

Permalink
ensure this function only returns strings (not unicode)
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@9660 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 18, 2015
1 parent 3548957 commit 728c2a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/xpra/platform/xposix/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ def get_layout_spec(self):
if v:
layouts = v.split(",")
layout = v
return layout, layouts, "", None
def s(v):
try:
return s.encode("ascii")
except:
return str(s)
return s(layout), [s(x) for x in layouts], b"", None


def get_keyboard_repeat(self):
Expand Down

0 comments on commit 728c2a4

Please sign in to comment.