From 6acd49a94a610156a1ba322bd8ead693377ee0bd Mon Sep 17 00:00:00 2001 From: Artur Tretiak Date: Sat, 12 Jan 2019 14:14:21 +0200 Subject: [PATCH] Undo commit d003f27518bbeee0def87f27733758a8ca7d379f --- Defs/Checks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Defs/Checks.py b/Defs/Checks.py index 2252329..fecf845 100644 --- a/Defs/Checks.py +++ b/Defs/Checks.py @@ -56,11 +56,11 @@ def checkPermissions(): if os.getuid() == 0: print("{0}Permissions granted!".format(GREEN)) else: - print("{0}If possible!! Please run as sudo !!".format(RED)) + raise PermissionError("{0}Permissions denied! Please run as '{1}sudo{0}'".format(RED, GREEN)) elif systemos() == 'Windows': if ctypes.windll.shell32.IsUserAnAdmin() != 0: print("{0}Permissions granted!".format(GREEN)) else: - print("{0}If possible! Please run as administrator!".format(RED)) + raise PermissionError("{0}Permissions denied! Please run as Administrator".format(RED)) else: raise PermissionError("{0}Permissions denied! Unexpected platform".format(RED))