diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-04-29 21:40:35 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-04-29 21:40:35 +0100 |
commit | 3541182b0aa10592f8e1e5461af933c45f09f2f3 (patch) | |
tree | 11a9b37d9989fffaaaac8260b6b31fa4ad3c8513 | |
parent | 98231d1a7a07a20175f2b20f65a78c2f80f99788 (diff) | |
download | sos-3541182b0aa10592f8e1e5461af933c45f09f2f3.tar.gz |
Drop Windows support
The Windows port is unmaintained (and likely broken). Drop the
support for now. If there's interest in developing and maintaining
the port in the future this can be easily reverted.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/policies/windows.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/sos/policies/windows.py b/sos/policies/windows.py deleted file mode 100644 index f3bbc7e4..00000000 --- a/sos/policies/windows.py +++ /dev/null @@ -1,48 +0,0 @@ -### This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -import os -import time -import platform - -from sos.policies import PackageManager, Policy -from sos.utilities import shell_out - -class WindowsPolicy(Policy): - - distro = "Microsoft Windows" - - @classmethod - def check(class_): - is_windows = False - try: - from java.lang import System - os_name = System.getProperty('os.name').lower() - except: - 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"): - return True - else: - admins = shell_out("net localgroup administrators") - username = shell_out("echo %USERNAME%") - return username.strip() in admins - - def preferred_archive_name(self): - from sos.archive import ZipFileArchive - return ZipFileArchive - -# vim: et ts=4 sw=4 |