Skip to content
Permalink
Browse files

Fix TypeError: 'cmp' is an invalid keyword argument for this function

  • Loading branch information
strk committed Jun 7, 2017
1 parent 14ab5eb commit 22791cf068ff28a43037033dc157640ab42c6685
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/plugins/db_manager/db_plugins/postgis/connector.py
@@ -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

0 comments on commit 22791cf

Please sign in to comment.
You can’t perform that action at this time.