From 4b481e377785f359e28cdcb9c6820d7f2773ea0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= Date: Fri, 18 Dec 2015 17:52:08 +0100 Subject: [PATCH] Python 3 deprecated the logger.warn method in favor of warning DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead Change-Id: I1905a91aefc9e7e39a9874c1c4e1710d0d6733c0 --- swauth/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swauth/middleware.py b/swauth/middleware.py index affc02b..4ae1260 100644 --- a/swauth/middleware.py +++ b/swauth/middleware.py @@ -146,7 +146,7 @@ class Swauth(object): msg = _('No super_admin_key set in conf file; Swauth ' 'administration features will be disabled.') try: - self.logger.warn(msg) + self.logger.warning(msg) except Exception: pass self.token_life = int(conf.get('token_life', 86400)) @@ -309,7 +309,7 @@ class Swauth(object): if self.swauth_remote: # TODO(gholt): Support S3-style authorization with # swauth_remote mode - self.logger.warn('S3-style authorization not supported yet ' + self.logger.warning('S3-style authorization not supported yet ' 'with swauth_remote mode.') return None try: