Fix sorted of None values in compare for python 3

This commit is contained in:
paradoxxxzero
2014-06-24 08:13:05 +00:00
parent de24f3e1b1
commit 1e5869e53e

View File

@@ -79,7 +79,8 @@ def _compare_tables(conn_table_names, metadata_table_names,
inspector.reflecttable(t, None)
conn_column_info[(s, tname)] = t
for s, tname in sorted(existing_tables):
for s, tname in sorted(existing_tables, key=lambda x: (x[0] or '', x[1])):
s = s or None
name = '%s.%s' % (s, tname) if s else tname
metadata_table = tname_to_table[(s, tname)]
conn_table = existing_metadata.tables[name]