hexchat/090fd29acf4af0d8e13fcf2861b14a356db72641.patch
DistroBaker d595aa16b3 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/hexchat.git#86bf619e4976707c356f308b3da0a8f756f80d7b
2021-03-16 19:30:53 +00:00

26 lines
906 B
Diff

From 090fd29acf4af0d8e13fcf2861b14a356db72641 Mon Sep 17 00:00:00 2001
From: Sbgodin <christophe.henry@sbgodin.fr>
Date: Sun, 7 Mar 2021 12:51:45 +0000
Subject: [PATCH] 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
---
plugins/python/_hexchat.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/python/_hexchat.py b/plugins/python/_hexchat.py
index 567b34934..5e4b0c65f 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 []