mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-30 22:54:14 +00:00 
			
		
		
		
	Fix python 3 support
This commit is contained in:
		| @@ -76,7 +76,10 @@ def wait_output(settings, popen): | |||||||
|  |  | ||||||
| def get_command(settings, args): | def get_command(settings, args): | ||||||
|     """Creates command from `args` and executes it.""" |     """Creates command from `args` and executes it.""" | ||||||
|  |     if sys.version_info[0] < 3: | ||||||
|         script = ' '.join(arg.decode('utf-8') for arg in args[1:]) |         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, |     result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE, | ||||||
|                    env=dict(os.environ, LANG='C')) |                    env=dict(os.environ, LANG='C')) | ||||||
|     if wait_output(settings, result): |     if wait_output(settings, result): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user