diff --git a/plugins/Dict/plugin.py b/plugins/Dict/plugin.py index c7fa21b50..1ceeafec4 100644 --- a/plugins/Dict/plugin.py +++ b/plugins/Dict/plugin.py @@ -37,7 +37,7 @@ import supybot.ircutils as ircutils import supybot.callbacks as callbacks try: - dictclient = universalImport('dictclient', 'local.dictclient') + dictclient = utils.python.universalImport('dictclient', 'local.dictclient') except ImportError: raise callbacks.Error, \ 'You need to have dictclient installed to use this plugin. ' \ diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index 8690feab9..7c73e7228 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -1,6 +1,6 @@ ### # Copyright (c) 2002-2004, Jeremiah Fincher -# Copyright (c) 2008, James Vega +# Copyright (c) 2008-2009, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -42,7 +42,14 @@ import supybot.ircmsgs as ircmsgs import supybot.ircutils as ircutils import supybot.callbacks as callbacks -simplejson = universalImport('json', 'simplejson', 'local.simplejson') +try: + simplejson = utils.python.universalImport('json', 'simplejson', + 'local.simplejson') +except ImportError: + raise callbacks.Error, \ + 'You need Python2.6 or the simplejson module installed to use ' \ + 'this plugin. Download the module at ' \ + '.' class Google(callbacks.PluginRegexp): threaded = True diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 249c752db..03b40a21f 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -42,7 +42,12 @@ import supybot.ircutils as ircutils import supybot.registry as registry import supybot.callbacks as callbacks -feedparser = utils.python.universalImport('feedparser', 'local.feedparser') +try: + feedparser = utils.python.universalImport('feedparser', 'local.feedparser') +except ImportError: + raise callbacks.Error, \ + 'You the feedparser module installed to use this plugin. ' \ + 'Download the module at .' def getFeedName(irc, msg, args, state): if not registry.isValidRegistryName(args[0]):