mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Fix crash when stdin has no encoding.
This commit is contained in:
parent
f5853c0a0b
commit
e2bd074146
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ def main():
|
||||||
|
|
||||||
# XXX there must be a better way to get Unicode argv
|
# XXX there must be a better way to get Unicode argv
|
||||||
# XXX this doesn't work on Windows durp
|
# XXX this doesn't work on Windows durp
|
||||||
enc = sys.stdin.encoding
|
enc = sys.stdin.encoding or 'utf8'
|
||||||
args = [_.decode(enc) for _ in args]
|
args = [_.decode(enc) for _ in args]
|
||||||
|
|
||||||
# Find the command as a function in this file
|
# Find the command as a function in this file
|
||||||
|
|
Loading…
Reference in a new issue