git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
751ea34
)
samba-tool dns: Trap on conneciton errors and give useful info
author
Andrew Bartlett
<abartlet@samba.org>
Fri, 7 Aug 2015 04:27:23 +0000
(16:27 +1200)
committer
Jeremy Allison
<jra@samba.org>
Tue, 20 Oct 2015 18:22:22 +0000
(20:22 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/netcmd/dns.py
patch
|
blob
|
history
diff --git
a/python/samba/netcmd/dns.py
b/python/samba/netcmd/dns.py
index 2cf9a1f13c554b5ac3f1507265ab256cb00755f2..7cedffcc28c942df785b7cc79d280f549f500b7e 100644
(file)
--- a/
python/samba/netcmd/dns.py
+++ b/
python/samba/netcmd/dns.py
@@
-37,7
+37,11
@@
def dns_connect(server, lp, creds):
if server.lower() == 'localhost':
server = '127.0.0.1'
binding_str = "ncacn_ip_tcp:%s[sign]" % server
- dns_conn = dnsserver.dnsserver(binding_str, lp, creds)
+ try:
+ dns_conn = dnsserver.dnsserver(binding_str, lp, creds)
+ except RuntimeError, e:
+ raise CommandError('Connecting to DNS RPC server %s failed with %s' % (server, e))
+
return dns_conn