python: Fix exception with list_pluginpref()

__decode cannot work (with Python3) because prefs_str has no attribute 'decode'.

Related to https://github.com/hexchat/hexchat/issues/2531
This commit is contained in:
Sbgodin 2021-03-07 12:51:45 +00:00 committed by Patrick
parent cc04916137
commit 090fd29acf

View File

@ -319,7 +319,7 @@ def del_pluginpref(name):
def list_pluginpref():
prefs_str = ffi.new('char[4096]')
if lib.hexchat_pluginpref_list(lib.ph, prefs_str) == 1:
return __decode(prefs_str).split(',')
return __decode(ffi.string(prefs_str)).split(',')
return []