We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 634b9a0 commit d9d6388Copy full SHA for d9d6388
bpython/urwid.py
@@ -167,7 +167,13 @@ def decoding_input_filter(keys, raw):
167
"""Input filter for urwid which decodes each key with the locale's
168
preferred encoding.'"""
169
encoding = locale.getpreferredencoding()
170
- return [key.decode(encoding) for key in keys]
+ converted_keys = list()
171
+ for key in keys:
172
+ if isinstance(keys, basestring):
173
+ converted_keys.append(key.decode(encoding))
174
+ else:
175
+ converted_keys.append(key)
176
+ return converted_keys
177
178
def format_tokens(tokensource):
179
for token, text in tokensource:
0 commit comments