diff options
Diffstat (limited to 'checkers/logging.py')
| -rw-r--r-- | checkers/logging.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/checkers/logging.py b/checkers/logging.py index 2c3c1d5a6..d93b1dd36 100644 --- a/checkers/logging.py +++ b/checkers/logging.py @@ -151,7 +151,8 @@ class LoggingChecker(checkers.BaseChecker): True, if the node represents a method call for the given type and method names, False otherwise. """ - assert isinstance(callfunc_node, astroid.CallFunc) + if not isinstance(callfunc_node, astroid.CallFunc): + return False func = utils.safe_infer(callfunc_node.func) return (isinstance(func, astroid.BoundMethod) and isinstance(func.bound, astroid.Instance) |
