]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- set flavor to "index" here as MySQL is sending None
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Sep 2014 21:03:43 +0000 (17:03 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Sep 2014 21:03:43 +0000 (17:03 -0400)
lib/sqlalchemy/engine/reflection.py

index cf1f2d3dd1302937353bc988a935b79cd58a240e..48a70664f104a99f5664935cdc0cabf7ead946b7 100644 (file)
@@ -583,7 +583,7 @@ class Inspector(object):
                     not set(columns).issubset(include_columns):
                 util.warn(
                     "Omitting %s key for (%s), key covers omitted columns." %
-                    (flavor, ', '.join(columns)))
+                    (flavor or "index", ', '.join(columns)))
                 continue
             # look for columns by orig name in cols_by_orig_name,
             # but support columns that are in-Python only as fallback
@@ -596,7 +596,7 @@ class Inspector(object):
                     util.warn(
                         "%s key '%s' was not located in "
                         "columns for table '%s'" % (
-                            flavor, c, table_name
+                            flavor or "index", c, table_name
                         ))
                 else:
                     idx_cols.append(idx_col)