From eef901894dce9192ec8c90d9cad0c20fde39a24f Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 22 Jan 2017 09:28:42 +0100 Subject: [PATCH] Add 'import supybot.i18n' warning to supybot-wizard. --- scripts/supybot | 2 +- scripts/supybot-wizard | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/supybot b/scripts/supybot index 63d3a5a4c..dc1b48fc0 100644 --- a/scripts/supybot +++ b/scripts/supybot @@ -74,7 +74,7 @@ try: except ImportError: sys.stderr.write("""Error: You are running a mix of Limnoria and stock Supybot code. Although you run - one of Limnoria\'s executables are installed, Python tries to load stock + one of Limnoria\'s executables, Python tries to load stock Supybot\'s library. To fix this issue, uninstall Supybot ("%s -m pip uninstall supybot" should do the job) and install Limnoria again. diff --git a/scripts/supybot-wizard b/scripts/supybot-wizard index c91ee187f..3150ec5ed 100644 --- a/scripts/supybot-wizard +++ b/scripts/supybot-wizard @@ -54,7 +54,20 @@ import socket import logging import optparse -import supybot.i18n as i18n +try: + import supybot.i18n as i18n +except ImportError: + sys.stderr.write("""Error: + You are running a mix of Limnoria and stock Supybot code. Although you run + one of Limnoria\'s executables, Python tries to load stock + Supybot\'s library. To fix this issue, uninstall Supybot + ("%s -m pip uninstall supybot" should do the job) + and install Limnoria again. + For your information, Supybot's libraries are installed here: + %s\n""" % + (sys.executable, '\n '.join(supybot.__path__))) + exit(-1) + import supybot.ansi as ansi import supybot.utils as utils import supybot.ircutils as ircutils