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
Gate win_osinfo and winservice #39370
Conversation
Fixes lint error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this is the right way to fix this. This sort of thing really makes for difficult to maintain and undercuts the functionality of the loader.
Instead, I think it would be better to place these classes into helper functions instead of gating them one by one.
…o gate_win_utils
@cachedout Is this one also good now? |
This one probably should have gone into the latest release |
@@ -15,7 +15,7 @@ | |||
import winerror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following the logic here. Why are we gating Windows-specific classes in functions but then leaving windows-specific imports at the global level? In my testing, Windows-specific exceptions are still thrown. I suspect we need to put these imports into a __virtual__
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this and winservice.py
are even being used anymore. I think they were early attempts to create a Windows Service for the Salt-Minion. We should probably look at getting rid of them.
What does this PR do?
Fixes stack trace caused by the loader trying to load windows specific utils in Non-Windows OSs.
What issues does this PR fix or reference?
#39314
#39323
Tests written?
`No