Skip to content

Commit

Permalink
Support unicode values in settings (#504)
Browse files Browse the repository at this point in the history
Fixes #503
  • Loading branch information
Piotr Dobrogost authored and disko committed Jul 13, 2016
1 parent 3b80ae9 commit 1be72fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kotti/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pyramid.threadlocal import get_current_registry
from pyramid.util import DottedNameResolver
from pyramid_beaker import session_factory_from_settings
from six import string_types
from six import binary_type, string_types
from sqlalchemy import MetaData
from sqlalchemy import engine_from_config
from sqlalchemy.ext.declarative import declarative_base
Expand Down Expand Up @@ -199,7 +199,7 @@ def base_configure(global_config, **settings):
settings.setdefault(key, value)

for key, value in settings.items():
if key.startswith('kotti') and isinstance(value, string_types):
if key.startswith('kotti') and isinstance(value, binary_type):
settings[key] = unicode(value, 'utf8')

# will be removed in 2.0
Expand Down

0 comments on commit 1be72fd

Please sign in to comment.