summaryrefslogtreecommitdiff
path: root/checkers/stdlib.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-01-12 21:29:27 +0200
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-01-12 21:29:27 +0200
commitc4e33851523d13a7359681f754c8cf63fbf44b6f (patch)
tree731475c45e57d2bea0f3dcbdf122a0096fd382e4 /checkers/stdlib.py
parenta2854ec66e8f92917a8b279552f1d4bc8b67a81f (diff)
downloadpylint-git-c4e33851523d13a7359681f754c8cf63fbf44b6f.tar.gz
Check the number of arguments before attempting to obtain the first one.
Diffstat (limited to 'checkers/stdlib.py')
-rw-r--r--checkers/stdlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/checkers/stdlib.py b/checkers/stdlib.py
index 216d640d5..b6b802623 100644
--- a/checkers/stdlib.py
+++ b/checkers/stdlib.py
@@ -134,7 +134,7 @@ class StdlibChecker(BaseChecker):
def _check_redundant_assert(self, node, infer):
if (isinstance(infer, astroid.BoundMethod) and
- isinstance(node.args[0], astroid.Const) and
+ node.args and isinstance(node.args[0], astroid.Const) and
infer.name in ['assertTrue', 'assertFalse']):
self.add_message('redundant-unittest-assert',
args=(infer.name, node.args[0].value, ),