Assume not an admin on non-Unix platforms

This commit is contained in:
Carl Osterwisch
2015-09-11 09:40:37 -04:00
parent 2b8d126b1e
commit 6862c63063
+1 -2
View File
@@ -23,12 +23,11 @@ def install_my_kernel_spec(user=True):
install_kernel_spec(td, 'bash', user=user, replace=True)
def _is_root():
"""Cross-platform way to check admin rights"""
import ctypes, os
try:
return os.geteuid() == 0
except AttributeError:
return ctypes.windll.shell32.IsUserAnAdmin() != 0
return False # assume not an admin on non-Unix platforms
def main(argv=[]):
user = '--user' in argv or not _is_root()