gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [ascension] 36/57: some experimental fixes


From: gnunet
Subject: [GNUnet-SVN] [ascension] 36/57: some experimental fixes
Date: Sat, 13 Apr 2019 13:32:33 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository ascension.

commit 9cbd14f862627191c8c75191506d05e891277818
Author: rexxnor <address@hidden>
AuthorDate: Thu Dec 13 17:57:31 2018 +0100

    some experimental fixes
---
 gnsmigrator/gnsmigrator.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnsmigrator/gnsmigrator.py b/gnsmigrator/gnsmigrator.py
index cac3d2c..47f1cfb 100644
--- a/gnsmigrator/gnsmigrator.py
+++ b/gnsmigrator/gnsmigrator.py
@@ -142,7 +142,7 @@ class GNSMigrator():
         # SOA is different if taken directly from SOA record
         # compared to AXFR/IXFR - changed to respect this
         try:
-            soa_answer = dns.resolver.query(domain, 'SOA')
+            soa_answer = dns.resolver.query(domain + '.', 'SOA')
         except dns.resolver.NoAnswer:
             logging.warning("the domain '%s' does not exist")
         master_answer = dns.resolver.query(soa_answer[0].mname, 'A')
@@ -324,7 +324,6 @@ class GNSMigrator():
         if rdtype == 'SOA':
             zonetuple = str(value).split(' ')
             domain = str(".".join(domain.split('.')[:-1]))
-            print(zonetuple)
             authns, owner, serial, refresh, retry, expiry, irefresh = zonetuple
             if authns[-1] == '.':
                 authns = authns[:-1]
@@ -367,7 +366,11 @@ class GNSMigrator():
             protocols = {'_tcp': 6, '_udp': 17}
 
             # tearing the record apart
-            _, proto = str(label).split('.')
+            try:
+                _, proto = str(label).split('.')
+            except ValueError:
+                logging.warning("could not parse SRV label %s" % label)
+                return (rdtype, None)
             priority, weight, destport, target = value.split(' ')
 
             protonum = protocols.get(proto)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]