Skip to content

Commit 91cfc1b

Browse files
jameswinegarandialbrecht
authored andcommitted
Update extract_table_names.py
PEP 479 Python 3.5+ raises an exception for StopIteration instead of a null return.
1 parent 338914c commit 91cfc1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/extract_table_names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def extract_from_part(parsed):
3535
for x in extract_from_part(item):
3636
yield x
3737
elif item.ttype is Keyword:
38-
raise StopIteration
38+
return
3939
else:
4040
yield item
4141
elif item.ttype is Keyword and item.value.upper() == 'FROM':

0 commit comments

Comments
 (0)