diff options
author | Jesse Jaggars <jhjaggars@gmail.com> | 2013-04-19 09:08:44 -0500 |
---|---|---|
committer | Jesse Jaggars <jhjaggars@gmail.com> | 2013-04-19 09:08:44 -0500 |
commit | b73f47bbf683a310bbe18543f5a058e3ae8af619 (patch) | |
tree | 29d57cf0a811ad3313f53c7f49aac77efa85d66a | |
parent | 1baf743054087363f37d5fcbdf4209a67a8edcd9 (diff) | |
download | sos-b73f47bbf683a310bbe18543f5a058e3ae8af619.tar.gz |
Fixing windows policy loading detection
Changed the detection logic to not collide with OS X
-rw-r--r-- | sos/policies/windows.py | 7 |
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"): |