1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 02:41:10 +01:00

Fixed UnicodeDecodeError

This commit is contained in:
Alex Nastetsky 2015-04-17 16:30:46 -04:00
parent 48831fa850
commit 2e91158091

View File

@ -57,8 +57,8 @@ def get_command(args):
"""Creates command from `args` and executes it."""
script = ' '.join(args[1:])
result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE)
return Command(script, result.stdout.read().decode(),
result.stderr.read().decode())
return Command(script, result.stdout.read().decode('utf-8'),
result.stderr.read().decode('utf-8'))
def get_matched_rule(command, rules, settings):