aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Jaggars <jhjaggars@gmail.com>2013-04-19 09:08:44 -0500
committerJesse Jaggars <jhjaggars@gmail.com>2013-04-19 09:08:44 -0500
commitb73f47bbf683a310bbe18543f5a058e3ae8af619 (patch)
tree29d57cf0a811ad3313f53c7f49aac77efa85d66a
parent1baf743054087363f37d5fcbdf4209a67a8edcd9 (diff)
downloadsos-b73f47bbf683a310bbe18543f5a058e3ae8af619.tar.gz
Fixing windows policy loading detection
Changed the detection logic to not collide with OS X
-rw-r--r--sos/policies/windows.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sos/policies/windows.py b/sos/policies/windows.py
index 0424a3f0..f2ce48c4 100644
--- a/sos/policies/windows.py
+++ b/sos/policies/windows.py
@@ -27,10 +27,11 @@ class WindowsPolicy(Policy):
is_windows = False
try:
from java.lang import System
- is_windows = "win" in System.getProperty('os.name').lower()
+ os_name = System.getProperty('os.name').lower()
except:
- is_windows = "win" in platform.system().lower()
- return is_windows
+ os_name = platform.system().lower()
+
+ return "win" in os_name and "darwin" not in os_name
def is_root(self):
if "S-1-16-12288" in shell_out("whoami /groups"):