mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
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:
parent
24e616af7d
commit
0f08207bdb
@ -1,6 +1,7 @@
|
|||||||
from LogAnalyzer import Test,TestResult
|
from LogAnalyzer import Test,TestResult
|
||||||
import DataflashLog
|
import DataflashLog
|
||||||
|
|
||||||
|
from functools import reduce
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
|
||||||
@ -112,13 +113,3 @@ class TestCompass(Test):
|
|||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
self.result.status = TestResult.StatusType.FAIL
|
self.result.status = TestResult.StatusType.FAIL
|
||||||
self.result.statusMessage = str(e) + ' not found'
|
self.result.statusMessage = str(e) + ' not found'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user