diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2012-11-03 12:45:52 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2012-11-03 12:45:52 +0100 |
| commit | c67a742e01ee7084ffd6ec0d531b96e343e6a5a5 (patch) | |
| tree | 6b03ac07bb5aa47af1d6c3bbf521561c7b591828 /bin/sqlformat | |
| parent | 0a877102119d4738369c1464107123f3f9e6978d (diff) | |
| download | sqlparse-c67a742e01ee7084ffd6ec0d531b96e343e6a5a5.tar.gz | |
Move SQLParseError to proper location and start deprecation of sqlparse.SQLParseError.
Diffstat (limited to 'bin/sqlformat')
| -rwxr-xr-x | bin/sqlformat | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sqlformat b/bin/sqlformat index 8d219a5..dd56b2a 100755 --- a/bin/sqlformat +++ b/bin/sqlformat @@ -10,6 +10,7 @@ import os import sys import sqlparse +from sqlparse.exceptions import SQLParseError _CASE_CHOICES = ['upper', 'lower', 'capitalize'] @@ -91,7 +92,7 @@ def main(): formatter_opts = _build_formatter_opts(options) try: formatter_opts = sqlparse.formatter.validate_options(formatter_opts) - except sqlparse.SQLParseError, err: + except SQLParseError, err: _error('Invalid options: %s' % err, exit_=1) stream.write(sqlparse.format(data, **formatter_opts).encode('utf-8', |
