]> git.ipfire.org Git - oddments/ddns.git/blobdiff - src/ddns/providers.py
Handle HTTP error 404 generically
[oddments/ddns.git] / src / ddns / providers.py
index a5385a9c6b1bb25c12d11dd5950d0aac74bff917..271f2c3658f88ba18148a0ded188878902f8b2c4 100644 (file)
@@ -1186,11 +1186,8 @@ class DDNSProviderZZZZ(DDNSProvider):
                        response = self.send_request(url, data=data)
 
                # Handle error codes.
-               except urllib2.HTTPError, e:
-                       if e.code == 404:
-                               raise DDNSRequestError(_("Invalid hostname specified."))
-
-                       raise
+               except DDNSNotFound:
+                       raise DDNSRequestError(_("Invalid hostname specified"))
 
                # Handle success messages.
                if response.code == 200: