Skip to content

CLI/Clush: Use the program name in OutputHandlers and RunTimer #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

mattaezell
Copy link
Contributor

Also allow manually-instantiated OutputHandlers to specify an alternate program
name.

Closes #433

Signed-off-by: Matt Ezell [email protected]

Also allow manually-instantiated OutputHandlers to specify an alternate program
name.

Closes cea-hpc#433

Signed-off-by: Matt Ezell <[email protected]>
@mattaezell
Copy link
Contributor Author

I debated whether or not to manually specify prog='clush' in the clush invocation of the output handlers or let it use sys.argv[0] by default. People using the command as clush3 will now see clush3 in their error messages (the unit tests don't change because they specify argv manually).

I also didn't add a specific test for this change, as the tests really don't belong in CLIClush.py. But happy to look into adding one if you have any guidance.

Copy link
Collaborator

@degremont degremont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks ok to me. If we decide to move these Handlers to a dedicated package, that's fine as we will have to import all of them here except for OutputHandler so we are probably good for compat.

@mattaezell
Copy link
Contributor Author

@thiell mind taking a look at this one? Thanks.

@thiell
Copy link
Collaborator

thiell commented Jun 22, 2020

Looks good, thanks!

@thiell thiell merged commit 9f25752 into cea-hpc:master Jun 22, 2020
@mattaezell mattaezell deleted the outputhandler_errprefix branch June 22, 2020 13:43
@thiell thiell added this to the 1.8.4 milestone Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use clush OutputHandlers in external tools
3 participants