mirror of https://github.com/Mikaela/Limnoria.git
Made the error message better when people try to run a plugin that requires sqlite and they don't have it.
This commit is contained in:
parent
2aaca31709
commit
3398f1a819
|
@ -47,8 +47,6 @@ import getopt
|
||||||
import string
|
import string
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import ircdb
|
import ircdb
|
||||||
|
@ -59,6 +57,13 @@ import ircutils
|
||||||
import callbacks
|
import callbacks
|
||||||
import configurable
|
import configurable
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
|
|
||||||
smileys = (':)', ';)', ':]', ':-)', ':-D', ':D', ':P', ':p', '(=', '=)')
|
smileys = (':)', ';)', ':]', ':-)', ':-D', ':D', ':P', ':p', '(=', '=)')
|
||||||
frowns = (':|', ':-/', ':-\\', ':\\', ':/', ':(', ':-(', ':\'(')
|
frowns = (':|', ':-/', ':-\\', ':\\', ':/', ':(', ':-(', ':\'(')
|
||||||
|
|
||||||
|
|
|
@ -33,19 +33,24 @@
|
||||||
Add the module docstring here. This will be used by the setup.py script.
|
Add the module docstring here. This will be used by the setup.py script.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
|
||||||
import conf
|
|
||||||
import time
|
|
||||||
import ircdb
|
|
||||||
import sqlite
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
|
import conf
|
||||||
import utils
|
import utils
|
||||||
|
import ircdb
|
||||||
|
import plugins
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
dbfilename = os.path.join(conf.dataDir, 'Dunno.db')
|
dbfilename = os.path.join(conf.dataDir, 'Dunno.db')
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
|
|
|
@ -44,8 +44,6 @@ import string
|
||||||
import os.path
|
import os.path
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import ircdb
|
import ircdb
|
||||||
|
@ -53,6 +51,12 @@ import ircutils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
|
class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
plugins.ChannelDBHandler.__init__(self)
|
plugins.ChannelDBHandler.__init__(self)
|
||||||
|
|
|
@ -45,8 +45,6 @@ import string
|
||||||
import os.path
|
import os.path
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import ircdb
|
import ircdb
|
||||||
import utils
|
import utils
|
||||||
|
@ -57,6 +55,12 @@ import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
import configurable
|
import configurable
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
tableCreateStatements = {
|
tableCreateStatements = {
|
||||||
'larts': ("""CREATE TABLE larts (
|
'larts': ("""CREATE TABLE larts (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
|
|
|
@ -40,12 +40,16 @@ import plugins
|
||||||
import re
|
import re
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
dbfilename = os.path.join(conf.dataDir, 'Infobot.db')
|
dbfilename = os.path.join(conf.dataDir, 'Infobot.db')
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
|
|
|
@ -39,15 +39,17 @@ import os
|
||||||
import sets
|
import sets
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
import plugins
|
import plugins
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
import configurable
|
import configurable
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
|
|
|
@ -43,13 +43,17 @@ import sys
|
||||||
import sets
|
import sets
|
||||||
import types
|
import types
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
# afterConnect are both lists. Append to onStart the commands you would
|
# afterConnect are both lists. Append to onStart the commands you would
|
||||||
|
|
|
@ -42,13 +42,16 @@ import plugins
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
import ircutils
|
import ircutils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
|
|
|
@ -46,7 +46,6 @@ import time
|
||||||
import shlex
|
import shlex
|
||||||
import string
|
import string
|
||||||
import random
|
import random
|
||||||
import sqlite
|
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
|
||||||
|
@ -60,6 +59,12 @@ import callbacks
|
||||||
|
|
||||||
import Owner
|
import Owner
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
dbfilename = os.path.join(conf.dataDir, 'MoobotFactoids')
|
dbfilename = os.path.join(conf.dataDir, 'MoobotFactoids')
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
|
|
|
@ -41,14 +41,18 @@ import plugins
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import ircdb
|
import ircdb
|
||||||
import utils
|
import utils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
# afterConnect are both lists. Append to onStart the commands you would
|
# afterConnect are both lists. Append to onStart the commands you would
|
||||||
|
|
|
@ -42,8 +42,6 @@ import time
|
||||||
import os.path
|
import os.path
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import ircdb
|
import ircdb
|
||||||
|
@ -53,6 +51,12 @@ import privmsgs
|
||||||
import ircutils
|
import ircutils
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
dbfilename = os.path.join(conf.dataDir, 'Notes.db')
|
dbfilename = os.path.join(conf.dataDir, 'Notes.db')
|
||||||
|
|
||||||
class NoteDb(plugins.DBHandler):
|
class NoteDb(plugins.DBHandler):
|
||||||
|
|
|
@ -41,8 +41,6 @@ import plugins
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import ircdb
|
import ircdb
|
||||||
|
@ -50,6 +48,11 @@ import ircutils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
|
|
|
@ -45,8 +45,6 @@ import os
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
|
@ -56,6 +54,11 @@ import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
import configurable
|
import configurable
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
|
|
|
@ -42,14 +42,18 @@ import time
|
||||||
import getopt
|
import getopt
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import ircdb
|
import ircdb
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
class Quotes(plugins.ChannelDBHandler, callbacks.Privmsg):
|
class Quotes(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
plugins.ChannelDBHandler.__init__(self)
|
plugins.ChannelDBHandler.__init__(self)
|
||||||
|
|
|
@ -44,14 +44,18 @@ import getopt
|
||||||
import string
|
import string
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import ircdb
|
import ircdb
|
||||||
import utils
|
import utils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
dbfilename = os.path.join(conf.dataDir, 'Todo.db')
|
dbfilename = os.path.join(conf.dataDir, 'Todo.db')
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
|
|
|
@ -46,8 +46,6 @@ import getopt
|
||||||
import urllib2
|
import urllib2
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
import sqlite
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
|
@ -56,6 +54,12 @@ import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
import configurable
|
import configurable
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
# afterConnect are both lists. Append to onStart the commands you would
|
# afterConnect are both lists. Append to onStart the commands you would
|
||||||
|
|
Loading…
Reference in New Issue