Пример #1
0
    et = time.localtime((time.mktime(tuple(st)) + 86400))
    et = list(et)
    et[3:] = [0, 0, 0, 0, 0, 0]

    stime = time.strftime('%d-%b-%Y', tuple(st))
    etime = time.strftime('%d-%b-%Y', tuple(et))

    mylog = Log(4)
    mylog.add(1, "Daily radius router summary\n")
    mylog.add(1, "\tProcessing Day: %s\n" % day)
    mylog.add(1, "\tOptions: %s\n" % opts)

    if config:
        exec("from %s import *" % (config))  # Load the module
    else:
        from OracConfig import *  # default

    conf = Config()

    summary = RtrSummary(day, st_epoch, mylog, config=conf)

    #    db.close()

    mylog.add(1, "(Generated by: radsrtrsummary.py)")
    subject = "Radius Router summary Processing for %s" % day
    try:
        mylog.SendMail(conf.SENDTO, conf.SENDFROM, subject)
    except:
        print mylog
    sys.exit(0)