mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
force as str before decoding as unicode
This commit is contained in:
parent
006341eb72
commit
8b59e46c64
@ -41,6 +41,7 @@ if is_py2:
|
|||||||
if text is None:
|
if text is None:
|
||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
|
text = str(text)
|
||||||
return text.decode('utf-8')
|
return text.decode('utf-8')
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
@ -282,7 +283,7 @@ def find_python_in_folder(folder, headless=True):
|
|||||||
if not retcode and pattern.search(output):
|
if not retcode and pattern.search(output):
|
||||||
return path
|
return path
|
||||||
except:
|
except:
|
||||||
log(DEBUG, u('Python Version Output: {0}').format(u(str(sys.exc_info()[1]))))
|
log(DEBUG, u('Python Version Output: {0}').format(u(sys.exc_info()[1])))
|
||||||
|
|
||||||
if headless:
|
if headless:
|
||||||
path = find_python_in_folder(folder, headless=False)
|
path = find_python_in_folder(folder, headless=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user