boatbod / op25

Fork of osmocom OP25 by boatbod
319 stars 100 forks source link

trunk.tsv format deviations are not handled gracefully #110

Closed scresante closed 3 years ago

scresante commented 3 years ago

When rx.py parses trunk.tsv, some small mistakes in the file cause a crash when they don't need to, and the exception generated isn't too helpful.

Spaces at the end of the line get passed to get_frequency, which expects a number, not blank spaces.

I have two simple fixes to address empty lines, and blank spaces at the ends of lines, which should be ignored.

I added the changes to my extant pull request… sorry, I'm still re-learning git and how to do clean pull requests.

boatbod commented 3 years ago

Thanks, I'll take a look.

As a general point I'd note that the rx.py version of op25 is deprecated and current development effort is being focused on multi_rx.py. Configuration for that is .json format with the exception of the trunk-tags and blacklist/whitelist files.

boatbod commented 3 years ago

I've reinforced the format checking and added the ability to include "#" comments