def __init__(self, db_host, db_user, db_pass, db_name, log_path): self.db_host = db_host self.db_user = db_user self.db_pass = db_pass self.db_name = db_name self.log = slog(log_path) self.com = '' self.cursor = ''
def __init__(self, address, port, log): self.address = address self.port = port self.channel = '' self.alarm_list = [] self.log_path_list = {SMS_LOGNAME:"%s/%s" % (log, SMS_LOGNAME), ALARM_LOGNAME:"%s/%s" % (log, ALARM_LOGNAME), DBCOM_LOGNAME:"%s/%s" % (log, DBCOM_LOGNAME)} try: self.log = slog(self.log_path_list[SMS_LOGNAME]) self.shared = shared() self.dbcom = dbcom(DB_HOST, DB_USER, DB_PASS, DB_NAME, self.log_path_list[DBCOM_LOGNAME]) self.manager = Manager(self.log_path_list[SMS_LOGNAME], self.log_path_list[ALARM_LOGNAME]) self.web = Web(self.log_path_list[SMS_LOGNAME], self.dbcom) except: print "Failed to create one of the objects." sys.exit(0)
def __init__(self, log, dbcom): self.log = slog(log) self.shared = shared() self.dbcom = dbcom
def __init__(self, log_path): self.log = slog(log_path) self.shared = shared()
def __init__(self, log_path, alarm_log_path): self.log = slog(log_path) self.alarm = alarm(alarm_log_path) self.shared = shared()