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

Fix Runner async_run and async_resume #2033

Closed
wants to merge 2 commits into from

Conversation

filipcacky
Copy link

@filipcacky filipcacky commented Sep 17, 2024

Fixes #2034

Comment on lines +312 to +321
except (CalledProcessError, TimeoutError) as e:
stdout_log = open(command_obj.log_files["stdout"]).read()
stderr_log = open(command_obj.log_files["stderr"]).read()
command = " ".join(command_obj.command)
error_message = "Error executing: '%s':\n" % command
if stdout_log.strip():
error_message += "\nStdout:\n%s\n" % stdout_log
if stderr_log.strip():
error_message += "\nStderr:\n%s\n" % stderr_log
raise RuntimeError(error_message) from e
Copy link
Author

Choose a reason for hiding this comment

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

Probably not great to have the exception handling copied over from __get_executing_run?

):
import asyncio

await asyncio.wait_for(command_obj.process.wait(), timeout)
Copy link
Author

Choose a reason for hiding this comment

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

Raises TimeoutError on timeout, but with a different description than the sync version.

@madhur-ob
Copy link
Collaborator

closing in favor of #2053

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.

AttributeError in Runner async_run and async_resume
2 participants