<commit_before>import os

import osgtest.library.core as core

def majorver():
    "Tomcat major version"
    if core.el_release() > 5:
        return 6
    else:
        return 5

def pkgname():
    "Name of the Tomcat package"
    return "tomcat" + str(majorver())

def datadir():
    "Path of data directory of Tomcat"
    return os.path.join("/usr/share", pkgname())

def logdir():
    "Path of log directory of Tomcat"
    return os.path.join("/var/log", pkgname())

def sysconfdir():
    "Path of config directory of Tomcat (i.e. what is in /etc)"
    return os.path.join("/etc", pkgname())

def conffile():
    "Path of main config file of Tomcat"
    return os.path.join(sysconfdir(), pkgname() + ".conf")

def pidfile():
    "Path of pid file of a running Tomcat"
    return os.path.join("/var/run", pkgname() + ".pid")

def serverlibdir():
    "Path of the server libraries dir of Tomcat"
    if majorver() == 6:
        return os.path.join(datadir(), "lib")
    else:
        return os.path.join(datadir(), "server/lib")<commit_msg>Update tomcat.py with EL7 paths<commit_after>import os

import osgtest.library.core as core

def majorver():
    "Tomcat major version"
    if core.el_release() == 7:
        return 7
    if core.el_release() == 6:
        return 6
    else:
        return 5

def pkgname():
    "Name of the Tomcat package"
    if majorver() <= 6:
        return "tomcat" + str(majorver())
    return "tomcat"

def datadir():
    "Path of data directory of Tomcat"
    return os.path.join("/usr/share", pkgname())

def logdir():
    "Path of log directory of Tomcat"
    return os.path.join("/var/log", pkgname())

def sysconfdir():
    "Path of config directory of Tomcat (i.e. what is in /etc)"
    return os.path.join("/etc", pkgname())

def conffile():
    "Path of main config file of Tomcat"
    return os.path.join(sysconfdir(), pkgname() + ".conf")

def pidfile():
    "Path of pid file of a running Tomcat"
    return os.path.join("/var/run", pkgname() + ".pid")

def serverlibdir():
    "Path of the server libraries dir of Tomcat"
    if majorver() >= 6:
        return os.path.join(datadir(), "lib")
    else:
        return os.path.join(datadir(), "server/lib")
{'fraction_non_alphanumeric': 0.1412994093593821, 'fraction_numerical': 0.005452067242162653, 'mean_word_length': 2.897345132743363, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5184813', 'n_tokens_mistral': 750, 'n_tokens_neox': 726, 'n_words': 241}