trx_toolkit/burst_send.py: exit if DATA dump parsing failed

False is not iterable, so we should properly handle the case
when parsing of the whole DATA dump was failed (e.g. due to
incorrect offset specified).

Change-Id: I5443efb39bb9d3377290ce7ec5e34016cae0edb2
This commit is contained in:
Vadim Yanitskiy 2018-12-16 06:55:38 +07:00
parent 7dacdcbd09
commit 2e32260040
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ class Application(ApplicationBase):
messages = self.ddf.parse_all(
skip = self.argv.cnt_skip, count = self.argv.cnt_count)
if messages is False:
pass # FIXME!!!
log.error("Parsing failed, nothing to send")
sys.exit(1)
for msg in messages:
# Pass filter