X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Fddns%2Ferrors.py;h=0bc1fa5a8a8a5668602c40fffdce3d4e43709508;hb=HEAD;hp=58928f30c4da73cf01aa39c09f7fff8405b3ab05;hpb=694d84857af02588b1effb9ddf51c6847ff2a9ae;p=oddments%2Fddns.git diff --git a/src/ddns/errors.py b/src/ddns/errors.py index 58928f3..0bc1fa5 100644 --- a/src/ddns/errors.py +++ b/src/ddns/errors.py @@ -1,8 +1,8 @@ -#!/usr/bin/python +#!/usr/bin/python3 ############################################################################### # # # ddns - A dynamic DNS client for IPFire # -# Copyright (C) 2012 IPFire development team # +# Copyright (C) 2012-2017 IPFire development team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -64,6 +64,13 @@ class DDNSBlockedError(DDNSError): reason = N_("The server denies any updates from this client") +class DDNSCertificateError(DDNSError): + """ + Thrown when a server presented an invalid certificate. + """ + reason = N_("Invalid certificate") + + class DDNSConfigurationError(DDNSError): """ Thrown when invalid or insufficient @@ -109,6 +116,20 @@ class DDNSNetworkUnreachableError(DDNSNetworkError): reason = N_("Network unreachable") +class DDNSNoRouteToHostError(DDNSNetworkError): + """ + Thrown when there is no route to a host. + """ + reason = N_("No route to host") + + +class DDNSNotFound(DDNSError): + """ + Thrown when the called URL has not been found + """ + reason = N_("Not found") + + class DDNSRequestError(DDNSError): """ Thrown when a request could @@ -125,6 +146,14 @@ class DDNSResolveError(DDNSNetworkError): reason = N_("Could not resolve DNS entry") +class DDNSSSLError(DDNSNetworkError): + """ + Raised when a SSL connection could not be + negotiated. + """ + reason = N_("SSL negotiation error") + + class DDNSServiceUnavailableError(DDNSNetworkError): """ Equivalent to HTTP error code 503. @@ -132,6 +161,13 @@ class DDNSServiceUnavailableError(DDNSNetworkError): reason = N_("Service unavailable") +class DDNSTooManyRequests(DDNSError): + """ + Raised when too many requests occured. + """ + reason = N_("Too many requests") + + class DDNSUpdateError(DDNSError): """ Thrown when an update could not be