Test if title is already unicode.

This commit is contained in:
Simon Conseil
2014-11-23 16:02:23 +01:00
parent d42915a1ca
commit dbc92d136d
2 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ import os
from os.path import abspath, isabs, join, normpath
from pprint import pformat
from .compat import PY2
from .compat import PY2, text_type
_DEFAULT_CONFIG = {
@@ -141,7 +141,7 @@ def read_settings(filename=None):
if PY2 and isinstance(settings[p], str):
settings[p] = settings[p].decode(enc)
if settings['title']:
if settings['title'] and not isinstance(settings['title'], text_type):
settings['title'] = settings['title'].decode('utf8')
for key in ('img_size', 'thumb_size', 'video_size'):

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
title = "Sigal test gallery ☺"
title = u"Sigal test gallery ☺"
source = 'pictures'
thumb_suffix = '.tn'
thumb_size = (200, 150)