From e48b78787ac1aeca2d2c15fdbe585178147fa6e8 Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 20 Sep 2004 19:12:32 +0000 Subject: [PATCH] This should fix bug #1031279, xml.sax exception when calling google commands. --- plugins/Google.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/Google.py b/plugins/Google.py index 789848384..5ec5ca9f8 100644 --- a/plugins/Google.py +++ b/plugins/Google.py @@ -199,9 +199,16 @@ class Google(callbacks.PrivmsgCommandAndRegexp): callBefore = ['URL'] regexps = ['googleSnarfer', 'googleGroups'] def __init__(self): - super(Google, self).__init__() + self.__parent = super(Google, self) + self.__parent.__init__() google.setLicense(self.registryValue('licenseKey')) + def callCommand(self, name, irc, msg, *L, **kwargs): + try: + self.__parent.callCommand(name, irc, msg, *L, **kwargs) + except xml.sax.SAXReaderNotAvailable, e: + irc.error('No XML parser available.') + _colorGoogles = {} def _getColorGoogle(self, m): s = m.group(1)