Drive name with special characters causes crash (correct) #1383

This commit is contained in:
nicolargo 2018-12-31 11:27:31 +01:00
parent 1e42fe4f9d
commit 457efd2496

View File

@ -97,6 +97,9 @@ if PY3:
def nativestr(s):
if isinstance(s, text_type):
return s
elif isinstance(s, (int, float)):
return s.__str__()
else:
return s.decode('utf-8', 'replace')
def system_exec(command):
@ -177,6 +180,9 @@ else:
def nativestr(s):
if isinstance(s, binary_type):
return s
elif isinstance(s, (int, float)):
return s.__str__()
else:
return s.encode('utf-8', 'replace')
def system_exec(command):