소스 검색

Updated logging calls to use arguments instead of string interpolation.

François Freitag 4 년 전
부모
커밋
7cd88b3fec
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      django/core/handlers/base.py
  2. 1 1
      django/utils/autoreload.py

+ 1 - 1
django/core/handlers/base.py

@@ -117,7 +117,7 @@ class BaseHandler:
                 return sync_to_async(method, thread_sensitive=True)
         elif method_is_async:
             if debug:
-                logger.debug('Asynchronous %s adapted.' % name)
+                logger.debug('Asynchronous %s adapted.', name)
             return async_to_sync(method)
         return method
 

+ 1 - 1
django/utils/autoreload.py

@@ -145,7 +145,7 @@ def iter_modules_and_files(modules, extra_files):
             continue
         except ValueError as e:
             # Network filesystems may return null bytes in file paths.
-            logger.debug('"%s" raised when resolving path: "%s"' % (str(e), path))
+            logger.debug('"%s" raised when resolving path: "%s"', e, path)
             continue
         results.add(resolved_path)
     return frozenset(results)