Fix Linux/Python3 issue with plugins
Strings are not always encoded, so we get exceptions when trying to double-decode. Just keep strings as-in in this case
This commit is contained in:
parent
f9c42585fb
commit
5354780904
|
@ -192,8 +192,11 @@ def LoadPlugins(bundlepath=None, userpath=None):
|
||||||
bundlepath and userpath are strings utf-8 encoded (compatible "C" strings).
|
bundlepath and userpath are strings utf-8 encoded (compatible "C" strings).
|
||||||
So convert these utf8 encoding to unicode strings to avoid any encoding issue.
|
So convert these utf8 encoding to unicode strings to avoid any encoding issue.
|
||||||
"""
|
"""
|
||||||
bundlepath = bundlepath.decode( 'UTF-8' );
|
try:
|
||||||
userpath = userpath.decode( 'UTF-8' );
|
bundlepath = bundlepath.decode( 'UTF-8' );
|
||||||
|
userpath = userpath.decode( 'UTF-8' );
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
config_path = pcbnew.SETTINGS_MANAGER.GetUserSettingsPath()
|
config_path = pcbnew.SETTINGS_MANAGER.GetUserSettingsPath()
|
||||||
plugin_directories=[]
|
plugin_directories=[]
|
||||||
|
|
Loading…
Reference in New Issue