-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcve.py
More file actions
34 lines (28 loc) · 1.11 KB
/
cve.py
File metadata and controls
34 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import abc
from database import *
class TypeInstanceException(Exception):
def __init__(self, *args, **kwargs):
super().__init__(args, kwargs)
class CVEDatabase(MySqlBase):
def __init__(self, db):
if isinstance(db, MySqlBase):
self.conn = db.conn
self.database = db.database
self.user = db.user
self.port = db.port
self.host = db.host
self.password = db.password
self.cur = db.cur
self.execption_list = {}
else:
raise TypeInstanceException("The variable 'db' is not instance of MySqlBase")
def default_table_column(self):
raise NotImplementedError("You should override this method to use.")
def insert(self, obj):
raise NotImplementedError("You should override this method to use.")
def load(self, obj):
raise NotImplementedError("You should override this method to use.")
def table_insert(self, tablename, jsonCollection):
raise NotImplementedError("You should override this method to use.")