From 87a994c14ce8c9430ba7f240c151473aea366f29 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 8 Sep 2012 09:54:23 +0200 Subject: supybot: import from rawhide --- supybot-0.83.4.1-json.patch | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 supybot-0.83.4.1-json.patch (limited to 'supybot-0.83.4.1-json.patch') diff --git a/supybot-0.83.4.1-json.patch b/supybot-0.83.4.1-json.patch new file mode 100644 index 0000000..f6606fe --- /dev/null +++ b/supybot-0.83.4.1-json.patch @@ -0,0 +1,30 @@ +diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py +index e1b6bee..98fd7dd 100644 +--- a/plugins/Google/plugin.py ++++ b/plugins/Google/plugin.py +@@ -42,15 +42,21 @@ import supybot.ircmsgs as ircmsgs + import supybot.ircutils as ircutils + import supybot.callbacks as callbacks + ++simplejson = None ++ ++try: ++ simplejson = utils.python.universalImport('json') ++except ImportError: ++ pass ++ + try: +- simplejson = utils.python.universalImport('json', 'simplejson', +- 'local.simplejson') + # The 3rd party simplejson module was included in Python 2.6 and renamed to + # json. Unfortunately, this conflicts with the 3rd party json module. + # Luckily, the 3rd party json module has a different interface so we test + # to make sure we aren't using it. +- if hasattr(simplejson, 'read'): +- raise ImportError ++ if simplejson is None or hasattr(simplejson, 'read'): ++ simplejson = utils.python.universalImport('simplejson', ++ 'local.simplejson') + except ImportError: + raise callbacks.Error, \ + 'You need Python2.6 or the simplejson module installed to use ' \ -- cgit