gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [ascension] branch master updated: fixed error handling


From: gnunet
Subject: [GNUnet-SVN] [ascension] branch master updated: fixed error handling
Date: Tue, 23 Apr 2019 10:54:02 +0200

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

rexxnor pushed a commit to branch master
in repository ascension.

The following commit(s) were added to refs/heads/master by this push:
     new 299a198  fixed error handling
299a198 is described below

commit 299a198e8b2d8dce1841169cb10fa6527da9c19e
Author: rexxnor <address@hidden>
AuthorDate: Tue Apr 23 10:53:25 2019 +0200

    fixed error handling
---
 ascension/ascension.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/ascension/ascension.py b/ascension/ascension.py
index 0fab268..510fb78 100644
--- a/ascension/ascension.py
+++ b/ascension/ascension.py
@@ -142,8 +142,6 @@ class Ascender():
                 zone = dns.zone.from_xfr(dns.query.xfr(
                     master_answer[0].address, domain,
                     port=cls.port))
-        except dns.exception.DNSException:
-            logging.error("Malformed DNS zone '%s'", domain)
         except dns.resolver.NoAnswer:
             logging.error("nameserver for '%s' did not answer", domain)
         except dns.exception.FormError:
@@ -171,12 +169,19 @@ class Ascender():
         if zoneserial == 0:
             logging.info("zone does not exist yet")
             cls.initial_zone_transfer()
+            try:
+                cls.zone = dns.zone.from_xfr(cls.zonegenerator)
+            except dns.zone.BadZone:
+                logging.error("Malformed DNS Zone '%s'", cls.domain)
             cls.zone = dns.zone.from_xfr(cls.zonegenerator)
             cls.soa = cls.get_zone_soa(cls.zone)
         elif zoneserial < currentserial:
             logging.info("zone is out of date")
             cls.initial_zone_transfer(serial=zoneserial)
-            cls.zone = dns.zone.from_xfr(cls.zonegenerator)
+            try:
+                cls.zone = dns.zone.from_xfr(cls.zonegenerator)
+            except dns.zone.BadZone:
+                logging.error("Malformed DNS Zone '%s'", cls.domain)
             cls.soa = cls.get_zone_soa(cls.zone)
         elif zoneserial == currentserial:
             logging.info("zone is up to date")

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



reply via email to

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