Stop execution if an invalid OS is encountered (to fix linter error).
๐ญ Motivation and context
Pylint was warning that url and filename on line 189 (now line 190) might not be defined. This is because url and filename are not defined in the preceding else condition. Stopping execution in this case resolves the issue.
๐งช Testing
Ran download_opa.py after hardcoding args.os to an invalid value. Note that simply specifying an invalid choice via the commandline won't work because argparse already forces you to choose a valid choice...meaning this whole fix is really a defensive programming thing.
โ Pre-approval checklist
[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] If applicable, All future TODOs are captured in issues, which are referenced in the PR description.
[x] The relevant issues PR resolves are linked preferably via closing keywords.
[x] All relevant type-of-change labels have been added.
๐ฃ Description
Stop execution if an invalid OS is encountered (to fix linter error).
๐ญ Motivation and context
Pylint was warning that
url
andfilename
on line 189 (now line 190) might not be defined. This is becauseurl
andfilename
are not defined in the precedingelse
condition. Stopping execution in this case resolves the issue.๐งช Testing
Ran download_opa.py after hardcoding
args.os
to an invalid value. Note that simply specifying an invalid choice via the commandline won't work because argparse already forces you to choose a valid choice...meaning this whole fix is really a defensive programming thing.โ Pre-approval checklist
โ Pre-merge Checklist
Squash and merge
button.โ Post-merge Checklist