python_hosts.exception module¶
hosts.exceptions¶
All exceptions used in the hosts code base are defined here.
-
exception
python_hosts.exception.
HostsEntryException
[source]¶ Bases:
exceptions.Exception
Base exception class. All HostsEntry-specific exceptions should subclass this class.
-
exception
python_hosts.exception.
HostsException
[source]¶ Bases:
exceptions.Exception
Base exception class. All Hosts-specific exceptions should subclass this class.
-
exception
python_hosts.exception.
InvalidComment
[source]¶ Bases:
python_hosts.exception.HostsEntryException
Raised when a HostsEntry is defined as type ‘comment’ but with an invalid comment
-
exception
python_hosts.exception.
InvalidIPv4Address
[source]¶ Bases:
python_hosts.exception.HostsEntryException
Raised when a HostsEntry is defined as type ‘ipv4’ but with an invalid address.
-
exception
python_hosts.exception.
InvalidIPv6Address
[source]¶ Bases:
python_hosts.exception.HostsEntryException
Raised when a HostsEntry is defined as type ‘ipv6’ but with an invalid address.
-
exception
python_hosts.exception.
UnableToWriteHosts
[source]¶ Bases:
python_hosts.exception.HostsException
Raised when a Hosts file cannot be written.