From 6862c63063ce51ca131a41ba2e3a16fbc1b0aa30 Mon Sep 17 00:00:00 2001 From: Carl Osterwisch Date: Fri, 11 Sep 2015 09:40:37 -0400 Subject: [PATCH] Assume not an admin on non-Unix platforms --- bash_kernel/install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bash_kernel/install.py b/bash_kernel/install.py index ca76f3a..3de6cd3 100644 --- a/bash_kernel/install.py +++ b/bash_kernel/install.py @@ -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()