changeset 4268:5376baf8cd6b

logging: use official log.warning instead of log.warn
author Mads Kiilerich <madski@unity3d.com>
date Fri, 18 Jul 2014 17:01:37 +0200
parents bf011c9f7f58
children dfdf6b1d38e9
files kallithea/lib/auth.py kallithea/lib/auth_modules/auth_internal.py kallithea/lib/auth_modules/auth_pam.py kallithea/lib/db_manage.py kallithea/lib/utils.py
diffstat 5 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/auth.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/lib/auth.py	Fri Jul 18 17:01:37 2014 +0200
@@ -765,7 +765,7 @@
                 if not _api_key:
                     log.debug("API KEY *NOT* present in request")
                 else:
-                    log.warn("API KEY ****%s *NOT* valid" % _api_key[-4:])
+                    log.warning("API KEY ****%s *NOT* valid" % _api_key[-4:])
 
         log.debug('Checking if %s is authenticated @ %s' % (user.username, loc))
         reason = 'RegularAuth' if user.is_authenticated else 'APIAuth'
@@ -776,7 +776,7 @@
             )
             return func(*fargs, **fkwargs)
         else:
-            log.warn('user %s authenticating with:%s NOT authenticated on func: %s: '
+            log.warning('user %s authenticating with:%s NOT authenticated on func: %s: '
                      'IP_ACCESS:%s API_ACCESS:%s'
                      % (user, reason, loc, ip_access_valid, api_access_valid)
             )
--- a/kallithea/lib/auth_modules/auth_internal.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/lib/auth_modules/auth_internal.py	Fri Jul 18 17:01:37 2014 +0200
@@ -64,7 +64,7 @@
             log.debug('userobj was:%s skipping' % (userobj, ))
             return None
         if userobj.extern_type != self.name:
-            log.warn("userobj:%s extern_type mismatch got:`%s` expected:`%s`"
+            log.warning("userobj:%s extern_type mismatch got:`%s` expected:`%s`"
                      % (userobj, userobj.extern_type, self.name))
             return None
 
--- a/kallithea/lib/auth_modules/auth_pam.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/lib/auth_modules/auth_pam.py	Fri Jul 18 17:01:37 2014 +0200
@@ -132,7 +132,7 @@
                 user_attrs["firstname"] = match.group('first_name')
                 user_attrs["lastname"] = match.group('last_name')
         except Exception:
-            log.warn("Cannot extract additional info for PAM user")
+            log.warning("Cannot extract additional info for PAM user")
             pass
 
         log.debug("pamuser: \n%s" % formatted_json(user_attrs))
--- a/kallithea/lib/db_manage.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/lib/db_manage.py	Fri Jul 18 17:01:37 2014 +0200
@@ -472,7 +472,7 @@
 
         # check write access, warn user about non writeable paths
         elif not os.access(path, os.W_OK) and path_ok:
-            log.warn('No write permission to given path %s' % (path,))
+            log.warning('No write permission to given path %s' % (path,))
             if not ask_ok('Given path %s is not writeable, do you want to '
                           'continue with read only mode ? [y/n]' % (path,)):
                 log.error('Canceled by user')
--- a/kallithea/lib/utils.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/lib/utils.py	Fri Jul 18 17:01:37 2014 +0200
@@ -237,10 +237,10 @@
 
     def _get_repos(p):
         if not os.access(p, os.R_OK) or not os.access(p, os.X_OK):
-            log.warn('ignoring repo path without access: %s' % (p,))
+            log.warning('ignoring repo path without access: %s' % (p,))
             return
         if not os.access(p, os.W_OK):
-            log.warn('repo path without write access: %s' % (p,))
+            log.warning('repo path without write access: %s' % (p,))
         for dirpath in os.listdir(p):
             if os.path.isfile(os.path.join(p, dirpath)):
                 continue