示例#1
0
def getMuleDownload():
    logger.info("getMuleDownload")
    ret = ""
    if not cmd_exists('amulecmd'):
        return ret
    try:
        downloads = subprocess.check_output(["amulecmd", "-P", AMULE_PASSWORD, "-c", "show dl"])
        ret = getStatsLine(downloads)
    except subprocess.CalledProcessError, e:
        logger.error(e)
示例#2
0
def getMuleStatus():
    logger.info("getMuleStatus")
    ret = ""
    if not cmd_exists('amulecmd'):
        return ret
    try:
        status = subprocess.check_output(["amulecmd", "-P", AMULE_PASSWORD, "-c", "status"])
        ret = getStatsLine(status)
    except subprocess.CalledProcessError, e:
        logger.error(e)