From ab8ac23749d90f0265d29cfe3440357098b97225 Mon Sep 17 00:00:00 2001 From: nvbn Date: Tue, 21 Apr 2015 06:33:51 +0200 Subject: [PATCH] Fix python 3 support --- thefuck/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thefuck/main.py b/thefuck/main.py index bc24453b..626a1ef7 100644 --- a/thefuck/main.py +++ b/thefuck/main.py @@ -76,7 +76,10 @@ def wait_output(settings, popen): def get_command(settings, args): """Creates command from `args` and executes it.""" - script = ' '.join(arg.decode('utf-8') for arg in args[1:]) + if sys.version_info[0] < 3: + script = ' '.join(arg.decode('utf-8') for arg in args[1:]) + else: + script = ' '.join(args[1:]) result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE, env=dict(os.environ, LANG='C')) if wait_output(settings, result):