Fix import for WinRM version check#68768
Fix import for WinRM version check#68768lubinatien wants to merge 2 commits intosaltstack:3006.xfrom
Conversation
PyPI's package is named pywinrm.
The importlib.metadata.version("winrm") call raises PackageNotFoundError which isn't caught by except ImportError, crashing the block and leaving winrm undefined despite being importable.
|
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here's some information that may help as you continue your Salt journey. There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
|
Could we get a changelog and a test for this. Maybe just verify that "HAS_WINRM" is true. |
|
Yes of course, I didn't include it as it's a partial rollback to what is was before: |
|
Ok, hope this will be enough, I won't have time to create a proper test but updated the ticket with what I could. |
PyPI's package is named pywinrm.
The importlib.metadata.version("winrm") call raises PackageNotFoundError which isn't caught by except ImportError, crashing the block and leaving winrm undefined despite being importable.
What does this PR do?
What issues does this PR fix or reference?
Fixes salt-cloud with Windows minions using Winrm
Previous Behavior
salt-cloud crashes when using winrm to deploy windows minion.
New Behavior
salt-cloud deploys windows minion correctly.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes/No