diff options
author | ndparker <ndparker@users.noreply.github.com> | 2014-09-24 00:13:40 +0200 |
---|---|---|
committer | ndparker <ndparker@users.noreply.github.com> | 2014-10-05 00:54:09 +0200 |
commit | 00018f0748a2eac323248c5d80c28a127907344a (patch) | |
tree | 1b0ce2f321f7951b1992224526fe08f7b60e18b2 /lib/sqlalchemy/engine | |
parent | 360477cc3af826b5056039b9a19ec3ecb2b94ede (diff) | |
download | sqlalchemy-pr/141.tar.gz |
specialize schema reflection warningspr/141
Diffstat (limited to 'lib/sqlalchemy/engine')
-rw-r--r-- | lib/sqlalchemy/engine/reflection.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index c0a3240a5..6e45b6102 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -605,9 +605,9 @@ class Inspector(object): flavor = index_d.get('type', 'index') if include_columns and \ not set(columns).issubset(include_columns): - util.warn( + util.warn(exc.SAOmittedIndexReflectionWarning( "Omitting %s key for (%s), key covers omitted columns." % - (flavor, ', '.join(columns))) + (flavor, ', '.join(columns)))) continue # look for columns by orig name in cols_by_orig_name, # but support columns that are in-Python only as fallback @@ -617,11 +617,11 @@ class Inspector(object): idx_col = cols_by_orig_name[c] \ if c in cols_by_orig_name else table.c[c] except KeyError: - util.warn( + util.warn(exc.SAIncompleteIndexReflectionWarning( "%s key '%s' was not located in " "columns for table '%s'" % ( flavor, c, table_name - )) + ))) else: idx_cols.append(idx_col) |