diff --git a/plugins/Factoids/plugin.py b/plugins/Factoids/plugin.py index 00ddee9cf..407b6929c 100644 --- a/plugins/Factoids/plugin.py +++ b/plugins/Factoids/plugin.py @@ -42,13 +42,6 @@ import supybot.callbacks as callbacks from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Factoids') -#try: - #import sqlite3 as sqlite -#except ImportError: - #raise callbacks.Error, 'You need to have PySQLite installed to use this ' \ - #'plugin. Download it at ' \ - #'' - try: import sqlite3 except ImportError: @@ -57,10 +50,6 @@ except ImportError: import re from supybot.utils.seq import dameraulevenshtein -# these are needed cuz we are overriding getdb -import threading -import supybot.world as world - def getFactoid(irc, msg, args, state): assert not state.channel callConverter('channel', irc, msg, args, state) @@ -123,20 +112,6 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler): db.commit() return db - # override this because sqlite3 doesn't have autocommit - # use isolation_level instead. - def getDb(self, channel): - """Use this to get a database for a specific channel.""" - currentThread = threading.currentThread() - if channel not in self.dbCache and currentThread == world.mainThread: - self.dbCache[channel] = self.makeDb(self.makeFilename(channel)) - if currentThread != world.mainThread: - db = self.makeDb(self.makeFilename(channel)) - else: - db = self.dbCache[channel] - db.isolation_level = None - return db - def getCommandHelp(self, command, simpleSyntax=None): method = self.getCommandMethod(command) if method.im_func.func_name == 'learn':