diff --git a/mode/python.py b/mode/python.py index 3f5ba6a..e831f8a 100644 --- a/mode/python.py +++ b/mode/python.py @@ -412,7 +412,7 @@ class PythonBrmFindReferences(Method): for tpl in tokens: lines.append('%-*s %3d%% confidence' % (l, tpl[0], tpl[1])) - if n == 0: + if not tokens: w.set_error('no references found') return