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