salt/fix-salt-master-for-old-psutil.patch

27 lines
845 B
Diff
Raw Normal View History

From 1828df2c90f82db3b1c8a1cb968245f38e2380fe 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.13.6