- # Send update to the server.
- response = self.send_request(url, data=data)
-
- # Get the full response message.
- output = response.read()
-
- # Handle success messages.
- if output.startswith("good") or output.startswith("nochg"):
- return
-
- # Handle error codes.
- if output == "badauth":
- raise DDNSAuthenticationError
- elif output == "aduse":
- raise DDNSAbuseError
- elif output == "911":
- raise DDNSInternalServerError
-
- # If we got here, some other update error happened.
- raise DDNSUpdateError