common.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:DeepSea 作者: SUSE 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号