Fix for working with python3 (ST3) #216

Closed
wants to merge 4 commits into
from

2 participants

@vigsterkr

shlex.split cannot handle bytes, and since python3 does not ignore anymore the b prefix of the strings (to the contrary of python 2.x), shlex.split will fail like this:
....
opts += shlex.split(output[0])
File "X/shlex.py", line 276, in split
File "X/shlex.py", line 266, in next
File "X/shlex.py", line 93, in get_token
File "X/shlex.py", line 121, in read_token
AttributeError: 'bytes' object has no attribute 'read'

Thus it's required to decode the string.

@quarnster
Owner

Won't that break ST2? I've changed it to use the helper functions I created to manage the differences between st2 and st3 instead. Could you try and see if that works for you?

@vigsterkr

this patch works fine as well... thnx

@quarnster quarnster closed this Mar 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment