##// END OF EJS Templates
Fixing shlex_split to return unicode on py2.x
Jörgen Stenarson -
Show More
@@ -77,13 +77,18 b' def shlex_split(x):'
77 comps = shlex.split(x)
77 comps = shlex.split(x)
78 if len(endofline) >= 1:
78 if len(endofline) >= 1:
79 comps.append(''.join(endofline))
79 comps.append(''.join(endofline))
80 if not py3compat.PY3:
81 comps = [py3compat.cast_unicode(x) for x in comps]
80 return comps
82 return comps
81
83
82 except ValueError:
84 except ValueError:
83 endofline = [x[-1:]]+endofline
85 endofline = [x[-1:]]+endofline
84 x = x[:-1]
86 x = x[:-1]
85
87
86 return [''.join(endofline)]
88 x = ''.join(endofline)
89 if not py3compat.PY3:
90 x = py3compat.cast_unicode(x)
91 return [x]
87
92
88 def module_list(path):
93 def module_list(path):
89 """
94 """
General Comments 0
You need to be logged in to leave comments. Login now