From 9b07fa11993fd2cb0ba7ccc08f5c38eedb906413 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 14 Oct 2014 16:05:56 +0200 Subject: [PATCH] better return report --- server-scripts/update | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server-scripts/update b/server-scripts/update index 5fc519b..0e8234c 100755 --- a/server-scripts/update +++ b/server-scripts/update @@ -42,6 +42,8 @@ domain = form.getfirst("domain") password = form.getfirst("password") ip = form.getfirst("ip") ipv6 = form.getfirst("ipv6") +assert domain is not None and password is not None +assert ip is not None or ipv6 is not None # run update program args = ["/var/lib/bind/dyn-nsupdate", "--domain", domain, "--password", password] @@ -59,4 +61,9 @@ if p.returncode or stderr or stdout: if stdout: print stdout if stderr: print stderr else: - print "good",ip + print "good", + if ip is not None: + print ip, + if ipv6 is not None: + print ipv6, + print -- 2.30.2