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 typo in ssh trying to access log.Progress.error #2200

Merged
merged 4 commits into from
Jul 3, 2023

Conversation

peace-maker
Copy link
Member

That function doesn't exist and .failure() is used everywhere else.

I feel like it should throw in _download_raw as well, since it would result in potentially returning a path to an invalid or non-existent file.

peace-maker and others added 2 commits May 31, 2023 20:05
That function doesn't exist and .failure() is used everywhere else.
@Arusekk
Copy link
Member

Arusekk commented May 31, 2023

log.error is also raising an exception, isn't it?

@peace-maker
Copy link
Member Author

Yes, but since we're in a with context the exception would cause the progress logger to print the exception and bubble it up. log.error would cause it to print twice? The progress logger and log.error itself?

The log.Progress logger doesn't print the exception when exiting the scope.
@peace-maker
Copy link
Member Author

After spending another minute on this, the __exit__ handler of log.Progress doesn't print the exception message, but only does self.failure(). So you're right and ´log.error` is the way to go.

@peace-maker peace-maker merged commit 8b4cacf into Gallopsled:stable Jul 3, 2023
9 checks passed
@peace-maker peace-maker deleted the ssh_log_error branch July 3, 2023 17:29
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.

2 participants