Skip to content
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

Replace message in events.CommandExecuted with stdout and stderr #379

Merged
merged 2 commits into from
May 18, 2021

Conversation

azawlocki
Copy link
Contributor

@azawlocki azawlocki commented May 17, 2021

Resolves #377

@azawlocki azawlocki requested review from a team, filipgolem and shadeofblue May 17, 2021 14:18
kwargs["command"] = cmds[self.kwargs["cmd_idx"]]
kwargs["stdout"] = kwargs["stderr"] = None
try:
# Replace the "message" kwarg with "stdout" and "stderr"
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm.... is this by design that we're allowing arbitrary other keyword arguments to pass through this function?

Copy link
Contributor Author

@azawlocki azawlocki May 18, 2021

Choose a reason for hiding this comment

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

Well, I'm not the original author of this piece of code but I guess the reason for that is that kwargs are used to provide arguments for calls to evt_cls.__init__(), where evt_cls is some subclass of CommandEvent known only at runtime. So it's not possible to specify statically which kwargs should be allowed.

Copy link
Contributor

@shadeofblue shadeofblue left a comment

Choose a reason for hiding this comment

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

looks good as far as I could tell :) ... just one question, to clarify

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.

Make command stdout/stderr available in CommandExecuted event
2 participants