diff options
author | Amjith Ramanujam <amjith@newrelic.com> | 2014-12-24 01:44:57 -0800 |
---|---|---|
committer | Amjith Ramanujam <amjith@newrelic.com> | 2014-12-24 01:44:57 -0800 |
commit | 7df2f4a946e8357bb78fa40888eb07b34a4957a6 (patch) | |
tree | d545288af092f543f6b1198e70f9db8594c4ba77 | |
parent | 566466e14122eb6c41b44dfb8992b67e35886e71 (diff) |
Fix a corner case in extract_tables.
-rw-r--r-- | pgcli/packages/parseutils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pgcli/packages/parseutils.py b/pgcli/packages/parseutils.py index 4b5564da..3209e3f2 100644 --- a/pgcli/packages/parseutils.py +++ b/pgcli/packages/parseutils.py @@ -100,5 +100,7 @@ def extract_table_identifiers(token_stream): yield item.value def extract_tables(sql): + if not sql: + return [] stream = extract_from_part(sqlparse.parse(sql)[0]) return list(extract_table_identifiers(stream)) |