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