Tools: define reduce() for Python 3

`reduce()` is called on line 55.  Python 3 dropped reduce() as a builtin.  https://docs.python.org/3/whatsnew/3.0.html#builtins encourages the rewriting of reduce() calls as explicit for loops or list comprehensions but I am not confident to try that in this context.
This commit is contained in:
cclauss 2017-08-26 09:39:41 +02:00 committed by Peter Barker
parent 24e616af7d
commit 0f08207bdb

View File

@ -1,6 +1,7 @@
from LogAnalyzer import Test,TestResult
import DataflashLog
from functools import reduce
import math
@ -112,13 +113,3 @@ class TestCompass(Test):
except KeyError as e:
self.result.status = TestResult.StatusType.FAIL
self.result.statusMessage = str(e) + ' not found'