def insert_msg_to_db(self, outp): """Insert received sms into database.""" if not self.cfg.has_section('database'): raise ConfigError('database not in sections') cfg = dict(self.cfg.items('database')) db = DbLink(**cfg) uuid = db.insert_msg(*outp) db.close()
def insert_msg_to_db(self, outp): """Insert received email into database.""" cfg = dict(self.cfg.items('database')) db = DbLink(**cfg) uuid = db.insert_msg(*outp) db.close()