mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Quiet exception logging on non-windows platforms
Some commits from earlier today in the win_status module result in numerous exceptions being logged on non-windows platforms. They are useful in Windows to notify the user that the proper prerequisites are not installed, but they are just noise on other platforms. This commit quiets that logging if the minion is not on a Windows platform.
This commit is contained in:
parent
649388a995
commit
af33a206d3
@ -17,6 +17,7 @@ try:
|
|||||||
import wmi
|
import wmi
|
||||||
has_required_packages = True
|
has_required_packages = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
if salt.utils.is_windows():
|
||||||
log.exception('pywin32 and wmi python packages are required '
|
log.exception('pywin32 and wmi python packages are required '
|
||||||
'in order to use the status module.')
|
'in order to use the status module.')
|
||||||
has_required_packages = False
|
has_required_packages = False
|
||||||
|
Loading…
Reference in New Issue
Block a user