diff --git a/jedi/parsing.py b/jedi/parsing.py index c7de5980..c80fb8f8 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -1276,7 +1276,9 @@ class PyFuzzyParser(object): self.top_module = top_module or self.module try: self._parse() - except common.MultiLevelStopIteration: + except (common.MultiLevelStopIteration, StopIteration): + # StopIteration needs to be added as well, because python 2 has a + # strange way of handling StopIterations. # sometimes StopIteration isn't catched. Just ignore it. pass diff --git a/test/regression.py b/test/regression.py index 9c16581d..ff3c5b7d 100755 --- a/test/regression.py +++ b/test/regression.py @@ -207,7 +207,7 @@ class TestRegression(TestBase): assert check(self.get_in_function_call(s, (4, 31)), 'compile', 0) # jedi-vim #70 s = """def foo(""" - assert check(self.get_in_function_call(s), None, 0) + assert self.get_in_function_call(s) is None def test_add_dynamic_mods(self): api.settings.additional_dynamic_modules = ['dynamic.py']