Skip to content

Commit

Permalink
Fix TypeError: 'cmp' is an invalid keyword argument for this function
Browse files Browse the repository at this point in the history
  • Loading branch information
strk committed Jun 7, 2017
1 parent 14ab5eb commit 22791cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/postgis/connector.py
Expand Up @@ -331,7 +331,7 @@ def getTables(self, schema=None, add_sys_tables=False):
items.append(item)
self._close_cursor(c)

return sorted(items, cmp=lambda x, y: cmp((x[2], x[1]), (y[2], y[1])))
return sorted(items, key=cmp_to_key(lambda x, y: (x[1] > y[1]) - (x[1] < y[1])))

def getVectorTables(self, schema=None):
""" get list of table with a geometry column
Expand Down

0 comments on commit 22791cf

Please sign in to comment.