diff options
author | Björn Jacke <bj@sernet.de> | 2020-01-13 00:21:41 +0100 |
---|---|---|
committer | Björn Baumbach <bb@sernet.de> | 2020-01-14 10:28:40 +0000 |
commit | af7a0e3371e1ae219239a91cb665097abbd50f3e (patch) | |
tree | df7b488e05f835559fccfe3ff842f9477b5a2c26 /python | |
parent | 89ed960b1da48ddcc459514871963b87503fd9ad (diff) | |
download | samba-af7a0e3371e1ae219239a91cb665097abbd50f3e.tar.gz |
samba-tool: fix adding of dns SRV/MX/SOA records
Thanks to Denis Cardon for finding
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13788
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Baumbach <bb@samba.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/netcmd/dns.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py index d9fda0b93cd..6cf8d40b2aa 100644 --- a/python/samba/netcmd/dns.py +++ b/python/samba/netcmd/dns.py @@ -417,14 +417,14 @@ def data_to_dns_record(record_type, data): elif record_type == dnsp.DNS_TYPE_NS: rec = NSRecord(data) elif record_type == dnsp.DNS_TYPE_MX: - tmp = data.split(' ') + tmp = data.split() if len(tmp) != 2: raise CommandError('Data requires 2 elements - mail_server, preference') mail_server = tmp[0] preference = int(tmp[1]) rec = MXRecord(mail_server, preference) elif record_type == dnsp.DNS_TYPE_SRV: - tmp = data.split(' ') + tmp = data.split() if len(tmp) != 4: raise CommandError('Data requires 4 elements - server, port, priority, weight') server = tmp[0] @@ -433,7 +433,7 @@ def data_to_dns_record(record_type, data): weight = int(tmp[3]) rec = SRVRecord(server, port, priority=priority, weight=weight) elif record_type == dnsp.DNS_TYPE_SOA: - tmp = data.split(' ') + tmp = data.split() if len(tmp) != 7: raise CommandError('Data requires 7 elements - nameserver, email, serial, ' 'refresh, retry, expire, minimumttl') |