コード例 #1
0
ファイル: AtcdDBQueueTask.py プロジェクト: thaingoc90/NATC
 def initTask(self):
     super(AtcdDBQueueTask, self).initTask()
     try:
         self.sqlite_manager = SQLiteManager(self.sqlite_file, self.logger)
     except OperationalError:
         self.logger.exception(
             'Unable to initialize DB from file "{0}"'.format(
                 self.sqlite_file))
         raise
コード例 #2
0
 def test_sqlite_file_not_found(self):
     with pytest.raises(sqlite3.OperationalError):
         SQLiteManager('/this/path/should/not/exist')
コード例 #3
0
def dbm(atc_db_file):
    return SQLiteManager(atc_db_file.name)