summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e3547ec)
Signed-off-by: Simo Sorce <simo@redhat.com>
+ def del_datum(self, plugin, idval):
+ DELETE = "DELETE FROM %s_data WHERE id=?" % plugin
+ con = None
+ try:
+ con = sqlite3.connect(self._admin_dbname)
+ cur = con.cursor()
+ cur.execute(DELETE, (idval,))
+ con.commit()
+ except sqlite3.Error, e:
+ if con:
+ con.rollback()
+ cherrypy.log.error("Failed to delete %s data: [%s]" % (plugin, e))
+ raise
+ finally:
+ if con:
+ con.close()
+
def wipe_data(self, plugin):
# Try to backup old data first, just in case
try:
def wipe_data(self, plugin):
# Try to backup old data first, just in case
try:
def new_datum(self, datum):
self._data.new_datum(self.name, datum)
def new_datum(self, datum):
self._data.new_datum(self.name, datum)
+ def del_datum(self, idval):
+ self._data.del_datum(self.name, idval)
+
def wipe_config_values(self, facility):
self._data.wipe_plugin_config(facility, self.name)
def wipe_config_values(self, facility):
self._data.wipe_plugin_config(facility, self.name)