Esempio n. 1
0
 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()
Esempio n. 2
0
 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()