mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
fixed possibility of StopIteration Exception to happen with wrong written ternary operators
This commit is contained in:
@@ -1217,7 +1217,10 @@ def follow_call_list(call_list):
|
||||
if str(call.name) == 'if':
|
||||
# Ternary operators.
|
||||
while True:
|
||||
call = next(calls_iterator)
|
||||
try:
|
||||
call = next(calls_iterator)
|
||||
except StopIteration:
|
||||
break
|
||||
try:
|
||||
if str(call.name) == 'else':
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user