mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27567 from whiteinge/psutil-version-fix
Use getattr to fetch psutil.version_info
This commit is contained in:
commit
b269cd4754
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