mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +01:00
Move ProtocolError to utils, and link the copy in classes to it
This commit is contained in:
parent
89699051d5
commit
d28006ae62
@ -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)
|
||||
|
||||
|
5
utils.py
5
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:
|
||||
|
Loading…
Reference in New Issue
Block a user