27 lines
845 B
Diff
27 lines
845 B
Diff
|
From e9635560f2b0a213518c5023e0b6fb4a11e5570d Mon Sep 17 00:00:00 2001
|
||
|
From: Mihai Dinca <mdinca@suse.de>
|
||
|
Date: Fri, 8 Dec 2017 13:34:06 +0100
|
||
|
Subject: [PATCH] Fix salt-master for old psutil
|
||
|
|
||
|
---
|
||
|
salt/utils/psutil_compat.py | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/salt/utils/psutil_compat.py b/salt/utils/psutil_compat.py
|
||
|
index a32712860a..dee563455b 100644
|
||
|
--- a/salt/utils/psutil_compat.py
|
||
|
+++ b/salt/utils/psutil_compat.py
|
||
|
@@ -26,7 +26,7 @@ else:
|
||
|
# Psuedo "from psutil import *"
|
||
|
_globals = globals()
|
||
|
for attr in psutil.__all__:
|
||
|
- _temp = __import__('psutil', globals(), locals(), [attr], -1)
|
||
|
+ _temp = __import__('psutil', globals(), locals(), [attr], -1 if six.PY2 else 0)
|
||
|
try:
|
||
|
_globals[attr] = getattr(_temp, attr)
|
||
|
except AttributeError:
|
||
|
--
|
||
|
2.15.1
|
||
|
|
||
|
|