7258: transcode os.path.join args from the fs enc to prevent a crash
Fix 3rd party plugin loading for Py2/Py3 in Windows when sys.path is in Unicode or/and is not encodable in 'mbcs' encodings
This commit is contained in:
@@ -1307,7 +1307,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
if sys.version_info[0] >= 3:
|
||||
key= str(key)
|
||||
else:
|
||||
key = str(tuple(str(k) for k in key))
|
||||
key = str(tuple(k.encode('utf-8') for k in key))
|
||||
if isinstance(key, UNITYPE):
|
||||
key = key.encode('utf-8')
|
||||
if not self.readonly:
|
||||
|
||||
Reference in New Issue
Block a user