Skip to content

Fix CLI argument checking#1

Open
Vonky42 wants to merge 1 commit intoAutoTuningAssociation:mainfrom
Vonky42:fix-cli-arg-check
Open

Fix CLI argument checking#1
Vonky42 wants to merge 1 commit intoAutoTuningAssociation:mainfrom
Vonky42:fix-cli-arg-check

Conversation

@Vonky42
Copy link

@Vonky42 Vonky42 commented Feb 20, 2026

This PR fixes the argument vector length check in the *.py files inside the kernels directory. This check was previously done after two index accesses on the argument vector, causing an IndexError when less than 2 arguments were passed. I have simply moved this check in front of these accesses as a fix.

Additionally the script name has been removed from the arguments section in the error message seen that the script name is already hardcoded in to the error message.

Also exclude script name (sys.argv[0]) from being displayed twice in the error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant