From: Philipp Spitzer Date: Tue, 8 Apr 2014 20:24:12 +0000 (+0200) Subject: Now the returncode of calls to nsupdate_dyndns is evaluated. X-Git-Tag: 0.0.2~5 X-Git-Url: https://git.toastfreeware.priv.at/toast/tdyndns.git/commitdiff_plain/a6542390f4f8ac7c096e3ab0f0ed27078a2ad1f1 Now the returncode of calls to nsupdate_dyndns is evaluated. --- diff --git a/cgi-bin/dyndns.py b/cgi-bin/dyndns.py index cb48a18..285d0dc 100755 --- a/cgi-bin/dyndns.py +++ b/cgi-bin/dyndns.py @@ -71,6 +71,9 @@ class MyipInvalid(MyipError): class OfflineInvalid(DynDnsError): returncode = 'badparam' # not documented at dyn.com +class NsupdateError(DynDnsError): + returncode = 'nohost' + fields = cgi.FieldStorage() @@ -165,7 +168,9 @@ try: if myip is not None: call_params.extend(['--ip', myip]) call_params.append(hostname) - call(call_params) + retcode = call(call_params) + if retcode != 0: + raise NsupdateError() # return success print "Content-Type: text/html"