Skip to content

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

Merged
thiell merged 1 commit into
clustershell:masterfrom
mattaezell:outputhandler_errprefix
Jun 22, 2020
Merged

CLI/Clush: Use the program name in OutputHandlers and RunTimer#434
thiell merged 1 commit into
clustershell:masterfrom
mattaezell:outputhandler_errprefix

Conversation

@mattaezell

Copy link
Copy Markdown
Contributor

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

Closes #433

Signed-off-by: Matt Ezell ezellma@ornl.gov

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

Closes clustershell#433

Signed-off-by: Matt Ezell <ezellma@ornl.gov>
@mattaezell

Copy link
Copy Markdown
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.

@degremont degremont left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor Author

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

@thiell

thiell commented Jun 22, 2020

Copy link
Copy Markdown
Collaborator

Looks good, thanks!

@thiell thiell merged commit 9f25752 into clustershell: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