Fix implicit call to unicode() from UI functions
BaseFolder now exposes an __unicode__ method so that function needing unicode transcoding don't crash due to ascii encoding errors. Signed-off-by: Stéphane Albert <sheeprine@oh.its.fake.nullplace.com> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
c0f4fa44eb
commit
57e6eda617
@ -98,6 +98,11 @@ class BaseFolder(object):
|
|||||||
# FIMXE: remove calls of this. We have getname().
|
# FIMXE: remove calls of this. We have getname().
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
# NOTE(sheeprine): Implicit call to this by UIBase deletingflags() which
|
||||||
|
# fails if the str is utf-8
|
||||||
|
return self.name.decode('utf-8')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def accountname(self):
|
def accountname(self):
|
||||||
"""Account name as string"""
|
"""Account name as string"""
|
||||||
|
Loading…
Reference in New Issue
Block a user