(groupname)
Remove group from system if exists
Remove group from system if exists
Remove group from system if exists
def remove_group(groupname):
    """
    Remove group from system if exists
    """
    try:
        grp.getgrnam(groupname)
    except KeyError:
        # Group doesn't exist, nothing to do
        return

    subprocess.check_call(["delgroup", "--quiet", groupname])
def remove_group ( groupname ) : try : grp . getgrnam ( groupname ) except KeyError : # Group doesn't exist, nothing to do return subprocess . check_call ( [ "delgroup" , "--quiet" , groupname ] )