From a84671dd3b7505d4d73f11ee9c7d057429542e24 Mon Sep 17 00:00:00 2001 From: nvbn Date: Sat, 18 Apr 2015 21:46:17 +0200 Subject: [PATCH] #20 Fix `UnicodeDecodeError` in `no_command` --- setup.py | 2 +- thefuck/rules/no_command.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ccc60cf..b4cd609 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup(name='thefuck', - version=1.9, + version=1.10, description="Magnificent app which corrects your previous console command", author='Vladimir Iakovlev', author_email='nvbn.rm@gmail.com', diff --git a/thefuck/rules/no_command.py b/thefuck/rules/no_command.py index cf05837..0c9b9f4 100644 --- a/thefuck/rules/no_command.py +++ b/thefuck/rules/no_command.py @@ -10,7 +10,7 @@ def _get_output(command, settings): name = command.script.split(' ')[command.script.startswith('sudo')] check_script = '{} {}'.format(settings.command_not_found, name) result = Popen(check_script, shell=True, stderr=PIPE) - return result.stderr.read().decode() + return result.stderr.read().decode('utf-8') @wrap_settings(local_settings)