nasa / CTF

This is a new repository for a new tool to be added to the cFS ecosystem called cFS Test Framework (CTF).
28 stars 6 forks source link

impossible condition for `if` #41

Closed snoyes closed 2 years ago

snoyes commented 2 years ago

https://github.com/nasa/CTF/blob/982311047cc2417ecdeaebed97ab8d967f40411d/lib/readers/json_script_reader.py#L192-L193

If line 193 is reached, then line 192 must have evaluated True, and therefore command cannot possibly be None. Perhaps the idea was to handle the case that the command has no 'params' key, in which case line 193 should be:

params = command.get('params', None)

blueoceanwater commented 2 years ago

Thank you for reporting the issue and for contributing the code fix. We do not have a legal process in place to accept coding contributions from our end-users at this time. Hence, we will implement our own fix for it and will make it available for CTF v1.7 release. But please continue to report issues to help us improve the tool for everyone.