Beispiel #1
0
    conf.hostName = conf.get("pipe", "hostname")
    conf.hostIp = conf.get("pipe", "hostip")
    if not conf.hostIp:
        from lib.ip import get_ip
        conf.hostIp = get_ip()
    if not conf.hostName:
        conf.hostName = conf.hostIp
    conf.environment = conf.get("pipe", "environment")
    if not conf.environment:
        conf.environment = 'production'

except Exception as E:
    log.critical("Error reading " + options.pipeconf + ": %s", E)
    exit(1)

try:
    conf.read(options.handlerconf)

    # server's base settings
    if options.port and (options.port != '0'):
        conf.port = int(options.port)
    else:
        conf.port = conf.getint("general", "port")
    conf.socketPacketLength = conf.getint("general", "socketPacketLength")
    conf.pathStorage = conf.get("general", "pathStorage")
    conf.pathTrash = conf.get("general", "pathTrash")

except Exception as E:
    log.critical("Error reading " + options.handlerconf + ": %s", E)
    exit(1)