John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/214017

Change subject: Allow botirc package to load without irc dep
......................................................................

Allow botirc package to load without irc dep

This allows sphinx to load the module without installing
pre-req package 'irc'.

Change-Id: I8235ca9008da07daeb65e1dae7424c2a8068a21e
---
M pywikibot/botirc.py
1 file changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/17/214017/1

diff --git a/pywikibot/botirc.py b/pywikibot/botirc.py
index c63f4d0..2464d8a 100644
--- a/pywikibot/botirc.py
+++ b/pywikibot/botirc.py
@@ -7,7 +7,7 @@
 """
 #
 # (C) Balasyum, 2008
-# (C) Pywikibot team, 2008-2014
+# (C) Pywikibot team, 2008-2015
 #
 # Distributed under the terms of the MIT license.
 #
@@ -22,7 +22,17 @@
 
 import re
 
-from ircbot import SingleServerIRCBot
+try:
+    from ircbot import SingleServerIRCBot
+except ImportError as e:
+    class SingleServerIRCBot(object):
+
+        """Fake SingleServerIRCBot."""
+
+        def __init__(*args, **kwargs):
+            """Report import exception."""
+            raise e
+
 
 _logger = "botirc"
 

-- 
To view, visit https://gerrit.wikimedia.org/r/214017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8235ca9008da07daeb65e1dae7424c2a8068a21e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to