mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
dsdl_compiler: check for StopIteration exception
This fixes the exception happening with Python 3.7. I'm assuming this has to do with: https://www.python.org/dev/peps/pep-0479/
This commit is contained in:
parent
65d1f61d9b
commit
90ae14efcd
@ -298,7 +298,10 @@ def make_template_expander(filename):
|
||||
def enum_last_value(iterable, start=0):
|
||||
it = iter(iterable)
|
||||
count = start
|
||||
last = next(it)
|
||||
try:
|
||||
last = next(it)
|
||||
except StopIteration:
|
||||
return
|
||||
for val in it:
|
||||
yield count, False, last
|
||||
last = val
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user