def check_root_privileges():
"""
This function checks if the current user is root.
If the user is not root it exits immediately.
"""
if os.getuid() != 0:
# check if root user
PrettyPrinter.println(PrettyPrinter.red("Root privileges are required to run this tool"))
sys.exit(1)
评论列表
文章目录