jenkins-bot has submitted this change and it was merged.
Change subject: Allow botirc module to load without irc dep ......................................................................
Allow botirc module 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(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved jenkins-bot: Verified
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"