Fix PhotoAlbum#__str__ for UTF-8 album titles
The __str__ method was crashing when an album title contained UTF-8 characters, such as an umlaut: "Jörg"
This commit is contained in:
parent
9bb6d75066
commit
01c8664aa6
1 changed files with 1 additions and 1 deletions
|
@ -403,7 +403,7 @@ class PhotoAlbum(object):
|
|||
if sys.version_info[0] >= 3:
|
||||
return as_unicode
|
||||
else:
|
||||
return as_unicode.encode('ascii', 'ignore')
|
||||
return as_unicode.encode('utf-8', 'ignore')
|
||||
|
||||
def __repr__(self):
|
||||
return "<%s: '%s'>" % (
|
||||
|
|
Loading…
Reference in a new issue