mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use getattr to fetch psutil.version_info
This was preventing the docs for this module from getting built. I'm not sure how or if that can be mocked using our normal docs Mock() system. It may be better to use Salt's loader to build the docs rather than mocking imports. Needs experimentation...
This commit is contained in:
parent
e5de9409c2
commit
7ebe9acc44
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ try:
|
|||
import salt.utils.psutil_compat as psutil
|
||||
|
||||
HAS_PSUTIL = True
|
||||
PSUTIL2 = psutil.version_info >= (2, 0)
|
||||
PSUTIL2 = getattr(psutil, 'version_info', ()) >= (2, 0)
|
||||
except ImportError:
|
||||
HAS_PSUTIL = False
|
||||
# pylint: enable=import-error
|
||||
|
|
Loading…
Add table
Reference in a new issue