|
@@ -35,6 +35,7 @@ else:
|
|
raise DatabaseException("python-sqlite2 not installed")
|
|
raise DatabaseException("python-sqlite2 not installed")
|
|
|
|
|
|
import pwman.util.config as config
|
|
import pwman.util.config as config
|
|
|
|
+
|
|
import cPickle
|
|
import cPickle
|
|
|
|
|
|
class SQLiteDatabase(Database):
|
|
class SQLiteDatabase(Database):
|
|
@@ -102,7 +103,6 @@ class SQLiteDatabase(Database):
|
|
m = re.search('S\"S\'(.+?)\'', tagstring)
|
|
m = re.search('S\"S\'(.+?)\'', tagstring)
|
|
if m:
|
|
if m:
|
|
found = m.group(1)
|
|
found = m.group(1)
|
|
- #tag = cPickle.loads(str(row[0]))
|
|
|
|
tags.append(Tag(found))
|
|
tags.append(Tag(found))
|
|
row = self._cur.fetchone()
|
|
row = self._cur.fetchone()
|
|
return tags
|
|
return tags
|
|
@@ -285,6 +285,10 @@ class SQLiteDatabase(Database):
|
|
raise e
|
|
raise e
|
|
|
|
|
|
def savekey(self, key):
|
|
def savekey(self, key):
|
|
|
|
+ """
|
|
|
|
+ This function is saving the key to table KEY.
|
|
|
|
+ The key already arrives as an encrypted string.
|
|
|
|
+ """
|
|
sql = "UPDATE KEY SET THEKEY = ?"
|
|
sql = "UPDATE KEY SET THEKEY = ?"
|
|
values = [key]
|
|
values = [key]
|
|
self._cur.execute(sql, values)
|
|
self._cur.execute(sql, values)
|