[PATCH] D67815: [LNT] Python 3 support: adapt to filter returning a view

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 01:42:22 PDT 2019


thopre created this revision.
thopre added reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls.
thopre added a parent revision: D67814: [LNT] Python 3 support: adapt to dict method returning views.
thopre added a child revision: D67816: [LNT] Python 3 support: use int() instead of long().

Adapt calls to filter() to the fact it returns a view in Python 3. This
was produced by running futurize's stage2 lib2to3.fixes.fix_filter.


https://reviews.llvm.org/D67815

Files:
  lnt/server/reporting/summaryreport.py


Index: lnt/server/reporting/summaryreport.py
===================================================================
--- lnt/server/reporting/summaryreport.py
+++ lnt/server/reporting/summaryreport.py
@@ -119,7 +119,7 @@
                 if rex.match(machine.name):
                     return True
         self.requested_machines = dict(
-            (ts, filter(should_be_in_report, session.query(ts.Machine).all()))
+            (ts, list(filter(should_be_in_report, session.query(ts.Machine).all())))
             for ts in self.testsuites)
         self.requested_machine_ids = dict(
             (ts, [m.id for m in machines])


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67815.220973.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190920/849bb34e/attachment.bin>


More information about the llvm-commits mailing list