summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSbgodin <christophe.henry@sbgodin.fr>2021-03-07 12:51:45 +0000
committerPatrick <tingping@tingping.se>2021-03-07 15:20:58 -0500
commit090fd29acf4af0d8e13fcf2861b14a356db72641 (patch)
tree0789dfb0b7aeac437715e5f1cf13db819ac322d3
parentcc049161378988fdb468cab1a9c00dc28b835b1f (diff)
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
-rw-r--r--plugins/python/_hexchat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/python/_hexchat.py b/plugins/python/_hexchat.py
index 567b3493..5e4b0c65 100644
--- a/plugins/python/_hexchat.py
+++ b/plugins/python/_hexchat.py
@@ -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 []