Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 10 additions & 31 deletions zeroconf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@
_TYPE_TXT,
_UNREGISTER_TIME,
)
from .exceptions import (
AbstractMethodException,
BadTypeInNameException,
Error,
IncomingDecodeError,
NamePartTooLongException,
NonUniqueNameException,
ServiceNameAlreadyRegistered,
)


__author__ = 'Paul Scott-Murphy, William McBrine'
__maintainer__ = 'Jakub Stasiak <jakub@stasiak.at>'
Expand Down Expand Up @@ -306,37 +316,6 @@ def instance_name_from_service_info(info: "ServiceInfo") -> str:
return info.name[: -len(service_name) - 1]


# Exceptions


class Error(Exception):
pass


class IncomingDecodeError(Error):
pass


class NonUniqueNameException(Error):
pass


class NamePartTooLongException(Error):
pass


class AbstractMethodException(Error):
pass


class BadTypeInNameException(Error):
pass


class ServiceNameAlreadyRegistered(Error):
pass


# implementation classes


Expand Down
51 changes: 51 additions & 0 deletions zeroconf/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine

This module provides a framework for the use of DNS Service Discovery
using IP multicast.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
"""

# Exceptions


class Error(Exception):
pass


class IncomingDecodeError(Error):
pass


class NonUniqueNameException(Error):
pass


class NamePartTooLongException(Error):
pass


class AbstractMethodException(Error):
pass


class BadTypeInNameException(Error):
pass


class ServiceNameAlreadyRegistered(Error):
pass