diff --git a/classes.py b/classes.py index 13616d8..d948a59 100644 --- a/classes.py +++ b/classes.py @@ -20,7 +20,7 @@ from collections import defaultdict, deque try: import ircmatch except ImportError: - raise ImportError("Please install the ircmatch library and try again.") + raise ImportError("PyLink requires ircmatch to function; please install it and try again.") from . import world, utils, structures, __version__ from .log import * @@ -541,7 +541,7 @@ class Irc(): # This is a stub to alias error to reply self.reply("Error: %s" % text, notice=notice, source=source, private=private, force_privmsg_in_private=force_privmsg_in_private, loopback=loopback) - + def toLower(self, text): """Returns a lowercase representation of text based on the IRC object's casemapping (rfc1459 or ascii).""" diff --git a/conf.py b/conf.py index 0beb721..50f6e0a 100644 --- a/conf.py +++ b/conf.py @@ -8,7 +8,7 @@ It provides simple checks for validating and loading YAML-format configurations try: import yaml except ImportError: - raise ImportError("Please install PyYAML and try again.") + raise ImportError("PyLink requires PyYAML to function; please install it and try again.") import sys import os.path diff --git a/coremods/login.py b/coremods/login.py index 9fc810e..1673ddc 100644 --- a/coremods/login.py +++ b/coremods/login.py @@ -4,7 +4,11 @@ login.py - Implement core login abstraction. from pylinkirc import conf, utils, world from pylinkirc.log import log -from passlib.context import CryptContext + +try: + from passlib.context import CryptContext +except ImportError: + raise ImportError("PyLink requires passlib to function; please install it and try again.") pwd_context = CryptContext(["sha512_crypt", "sha256_crypt"], all__vary_rounds=0.1,