Created
September 2, 2019 10:43
-
-
Save yzdann/735762847e001f7101cef97eec000cf1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RootAccessException(Exception): | |
""" | |
Prevent running with Root Privileges | |
""" | |
pass | |
if os.getuid() == 0: | |
raise RootAccessException("Shouldn't run this script with Root Privileges") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment