def setup(self): print "SETUP" args = hal_common.get_dict(self.config, "plugins") self.plugin_dir = args["directory"] self.notify.message("debug", "Appending plugin dir: %s" % (self.plugin_dir)) sys.path.append(self.plugin_dir)
def attach(self, config_file): self.n_config = hal_common.get_dict(config_file, "notify") self.to_addr = self.n_config["to_addr"] self.smtp_server = self.n_config["smtp_server"] self.smtp_port = self.n_config["smtp_port"] self.smtp_timeout = self.n_config["smtp_timeout"] self.smtp_ssl = self.n_config["smtp_ssl"] self.smtp_debug_level = self.n_config["email_debug_level"] self.smtp_password = self.n_config["smtp_password"] self.smtp_username = self.n_config["smtp_username"]
def attach(self, config_obj, notify_obj): self.config = hal_common.get_dict(config_obj, "database") self.notify = notify_obj self.setup()