diff --git a/ckan/lib/repoze_plugins/auth_tkt.py b/ckan/lib/repoze_plugins/auth_tkt.py index 8d073c1b6ec..75af0258111 100644 --- a/ckan/lib/repoze_plugins/auth_tkt.py +++ b/ckan/lib/repoze_plugins/auth_tkt.py @@ -27,8 +27,8 @@ def _get_cookies(self, *args, **kwargs): cookies = [] for k, v in super_cookies: - replace_with = u'; HttpOnly' if self.httponly else u'' - v = v.replace(u'; HttpOnly', u'') + replace_with + replace_with = '; HttpOnly' if self.httponly else '' + v = v.replace('; HttpOnly', '') + replace_with cookies.append((k, v)) return cookies @@ -36,7 +36,7 @@ def _get_cookies(self, *args, **kwargs): def make_plugin(secret=None, secretfile=None, - cookie_name=u'auth_tkt', + cookie_name='auth_tkt', secure=False, include_ip=False, timeout=None, diff --git a/ckan/tests/test_coding_standards.py b/ckan/tests/test_coding_standards.py index 3822619f3e4..944c57ca809 100644 --- a/ckan/tests/test_coding_standards.py +++ b/ckan/tests/test_coding_standards.py @@ -264,7 +264,6 @@ def find_unprefixed_string_literals(filename): u'ckan/lib/activity_streams.py', u'ckan/lib/activity_streams_session_extension.py', u'ckan/lib/app_globals.py', - u'ckan/lib/auth_tkt.py', u'ckan/lib/authenticator.py', u'ckan/lib/base.py', u'ckan/lib/captcha.py', @@ -298,6 +297,7 @@ def find_unprefixed_string_literals(filename): u'ckan/lib/search/index.py', u'ckan/lib/search/query.py', u'ckan/lib/search/sql.py', + u'ckan/lib/repoze_plugins/auth_tkt.py', u'ckan/lib/uploader.py', u'ckan/logic/__init__.py', u'ckan/logic/action/__init__.py',