def _runlevel():
    '''
    Return the current runlevel
    '''
    if 'upstart._runlevel' in __context__:
        return __context__['upstart._runlevel']
    out = __salt__['cmd.run'](['runlevel', '{0}'.format(_find_utmp())], python_shell=False)
    try:
        ret = out.split()[1]
    except __HOLE__:
        # The runlevel is unknown, return the default
        ret = _default_runlevel()
    __context__['upstart._runlevel'] = ret
    return ret
dataset/ETHPy150Open saltstack/salt/salt/modules/upstart.py/_runlevel