diff --git a/classes.py b/classes.py index e689a00..2cae9fc 100644 --- a/classes.py +++ b/classes.py @@ -28,12 +28,7 @@ except ImportError: from . import world, utils, structures, conf, __version__ from .log import * from .coremods import control - -### Exceptions - -# XXX: is this the right place to put this class? -class ProtocolError(RuntimeError): - pass +from .utils import ProtocolError # Compatibility with PyLink 1.x ### Internal classes (users, servers, channels) diff --git a/utils.py b/utils.py index 156f071..52a48f9 100644 --- a/utils.py +++ b/utils.py @@ -33,6 +33,11 @@ class InvalidArgumentsError(TypeError): Exception raised (by IRCParser and potentially others) when a bot command is given invalid arguments. """ +class ProtocolError(RuntimeError): + """ + Exception raised when a network protocol violation is encountered in some way. + """ + class IncrementalUIDGenerator(): """ Incremental UID Generator module, adapted from InspIRCd source: