mirror of https://github.com/Shizmob/pydle.git
Rename IRCError to Error.
This commit is contained in:
parent
9b4242df77
commit
dedbb64267
|
@ -8,21 +8,21 @@ from . import async
|
||||||
from . import connection
|
from . import connection
|
||||||
from . import protocol
|
from . import protocol
|
||||||
|
|
||||||
__all__ = [ 'AlreadyInChannel', 'NotInChannel', 'BasicClient' ]
|
__all__ = [ 'Error', 'AlreadyInChannel', 'NotInChannel', 'BasicClient' ]
|
||||||
PING_TIMEOUT = 180
|
PING_TIMEOUT = 180
|
||||||
DEFAULT_NICKNAME = '<unregistered>'
|
DEFAULT_NICKNAME = '<unregistered>'
|
||||||
|
|
||||||
|
|
||||||
class IRCError(Exception):
|
class Error(Exception):
|
||||||
""" Base class for all pydle errors. """
|
""" Base class for all pydle errors. """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class NotInChannel(IRCError):
|
class NotInChannel(Error):
|
||||||
def __init__(self, channel):
|
def __init__(self, channel):
|
||||||
super().__init__('Not in channel: {}'.format(channel))
|
super().__init__('Not in channel: {}'.format(channel))
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
|
|
||||||
class AlreadyInChannel(IRCError):
|
class AlreadyInChannel(Error):
|
||||||
def __init__(self, channel):
|
def __init__(self, channel):
|
||||||
super().__init__('Already in channel: {}'.format(channel))
|
super().__init__('Already in channel: {}'.format(channel))
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
|
|
Loading…
Reference in New Issue