diff options
| author | James Winegar <jameswinegar@users.noreply.github.com> | 2019-07-17 00:00:01 -0500 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2019-07-18 08:17:41 +0200 |
| commit | 91cfc1bfcd86640538fa98b6ceaae64d0d4c9328 (patch) | |
| tree | 0655b8c73166338e4ac87a6811bb0b639c35aa49 /examples | |
| parent | 338914c7846a0b56924234e658548ba15d6e260b (diff) | |
| download | sqlparse-91cfc1bfcd86640538fa98b6ceaae64d0d4c9328.tar.gz | |
Update extract_table_names.py
PEP 479 Python 3.5+ raises an exception for StopIteration instead of a null return.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/extract_table_names.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/extract_table_names.py b/examples/extract_table_names.py index a3ca333..8f0065e 100644 --- a/examples/extract_table_names.py +++ b/examples/extract_table_names.py @@ -35,7 +35,7 @@ def extract_from_part(parsed): for x in extract_from_part(item): yield x elif item.ttype is Keyword: - raise StopIteration + return else: yield item elif item.ttype is Keyword and item.value.upper() == 'FROM': |
