[server] import filter from six.moves
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 05 Oct 2015 15:48:19 +0200
changeset 10767 7ec3ca800a06
parent 10766 d730f91251af
child 10768 99689a5862ea
[server] import filter from six.moves
server/__init__.py
--- a/server/__init__.py	Mon Oct 05 14:51:24 2015 +0200
+++ b/server/__init__.py	Mon Oct 05 15:48:19 2015 +0200
@@ -30,6 +30,7 @@
 from contextlib import contextmanager
 
 from six import text_type, string_types
+from six.moves import filter
 
 from logilab.common.modutils import LazyObject
 from logilab.common.textutils import splitstrip
@@ -245,7 +246,7 @@
         if failed:
             failed = sqlexec(failed, execute, cnx=sqlcnx,
                              pbtitle='-> dropping tables (second pass)')
-            remainings = filter(drop_filter, helper.list_tables(sqlcursor))
+            remainings = list(filter(drop_filter, helper.list_tables(sqlcursor)))
             assert not remainings, 'Remaining tables: %s' % ', '.join(remainings)
     _title = '-> creating tables '
     print(_title, end=' ')