From 6eb2155497891344b4f6c7d1ce5992f748044876 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 30 Mar 2018 16:15:50 +0300 Subject: [PATCH] Another unicode -> str bug (#1194) --- src/bitmessageqt/foldertree.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py index f3ac38d8..3cdf4ab0 100644 --- a/src/bitmessageqt/foldertree.py +++ b/src/bitmessageqt/foldertree.py @@ -233,8 +233,9 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin): and self.type != AccountMixin.SUBSCRIPTION: BMConfigParser().set( str(self.address), 'label', - str(value).toString().toUtf8() - if isinstance(value, QtCore.QVariant) else str(value) + str(value.toString().toUtf8()) + if isinstance(value, QtCore.QVariant) + else value.encode('utf-8') ) BMConfigParser().save() return super(Ui_AddressWidget, self).setData(column, role, value)