mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
Revert "Factoids & Karma & MessageParser & MoobotFactoids & QuoteGrabs: Fix Pypy3 support."
This reverts commit 30e03a542a
.
This commit is contained in:
parent
8c640558ab
commit
907ede8035
@ -217,8 +217,10 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
|
||||
def makeDb(self, filename):
|
||||
if os.path.exists(filename):
|
||||
db = sqlite3.connect(filename)
|
||||
db.text_factory = str
|
||||
return db
|
||||
db = sqlite3.connect(filename)
|
||||
db.text_factory = str
|
||||
cursor = db.cursor()
|
||||
cursor.execute("""CREATE TABLE keys (
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
@ -58,6 +58,7 @@ class SqliteKarmaDB(object):
|
||||
return self.dbs[filename]
|
||||
if os.path.exists(filename):
|
||||
db = sqlite3.connect(filename, check_same_thread=False)
|
||||
db.text_factory = str
|
||||
self.dbs[filename] = db
|
||||
return db
|
||||
db = sqlite3.connect(filename, check_same_thread=False)
|
||||
|
@ -80,8 +80,10 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler):
|
||||
"""Create the database and connect to it."""
|
||||
if os.path.exists(filename):
|
||||
db = sqlite3.connect(filename)
|
||||
db.text_factory = str
|
||||
return db
|
||||
db = sqlite3.connect(filename)
|
||||
db.text_factory = str
|
||||
cursor = db.cursor()
|
||||
cursor.execute("""CREATE TABLE triggers (
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
@ -106,9 +106,11 @@ class SqliteMoobotDB(object):
|
||||
|
||||
if os.path.exists(filename):
|
||||
db = sqlite3.connect(filename, check_same_thread=False)
|
||||
db.text_factory = str
|
||||
self.dbs[channel] = db
|
||||
return db
|
||||
db = sqlite3.connect(filename, check_same_thread=False)
|
||||
db.text_factory = str
|
||||
self.dbs[channel] = db
|
||||
cursor = db.cursor()
|
||||
cursor.execute("""CREATE TABLE factoids (
|
||||
|
@ -82,10 +82,12 @@ class SqliteQuoteGrabsDB(object):
|
||||
return self.dbs[filename]
|
||||
if os.path.exists(filename):
|
||||
db = sqlite3.connect(filename)
|
||||
db.text_factory = str
|
||||
db.create_function('nickeq', 2, p)
|
||||
self.dbs[filename] = db
|
||||
return db
|
||||
db = sqlite3.connect(filename)
|
||||
db.text_factory = str
|
||||
db.create_function('nickeq', 2, p)
|
||||
self.dbs[filename] = db
|
||||
cursor = db.cursor()
|
||||
|
Loading…
Reference in New Issue
Block a user