Undefined reference to 'parser' in main() of generate_baseline.py #92

Closed
opened 2026-01-19 18:29:12 +00:00 by michael · 0 comments
Owner

Originally created by @seanchristians on GitHub.

Originally assigned to: @brodjieski on GitHub.

In the first except statement in the main() function of generate_baseline.py there is an undefined reference to parser. Was this supposed to be args instead?

What is the point of the code block anyways? It seems to add a string to the error key of parser which is never referenced.

In the event of an IOError, why is the script expected to continue gracefully? In my opinion this indicates a greater problem with the system and should terminate the script.

Originally created by @seanchristians on GitHub. Originally assigned to: @brodjieski on GitHub. <!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label and verify the issue you're about to submit isn't a duplicate. ---> In the first `except` statement in the main() function of [generate_baseline.py](https://github.com/usnistgov/macos_security/blob/main/scripts/generate_baseline.py) there is an undefined reference to `parser`. Was this supposed to be `args` instead? What is the point of the code block anyways? It seems to add a string to the `error` key of `parser` which is never referenced. In the event of an IOError, why is the script expected to continue gracefully? In my opinion this indicates a greater problem with the system and should terminate the script.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: usnistgov/macos_security#92