[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [ascension] 43/45: updated dependencies, setup.py, removed
From: |
gnunet |
Subject: |
[GNUnet-SVN] [ascension] 43/45: updated dependencies, setup.py, removed TODOs, improved error handling |
Date: |
Fri, 25 Jan 2019 10:02:43 +0100 |
This is an automated email from the git hooks/post-receive script.
rexxnor pushed a commit to branch master
in repository ascension.
commit 37e34e07857b86b5e20b265808fbbcea818f7029
Author: rexxnor <address@hidden>
AuthorDate: Fri Jan 18 17:04:20 2019 +0100
updated dependencies, setup.py, removed TODOs, improved error handling
---
ascension/ascension.py | 25 +++++++++++++++++--------
requirements.txt | 12 ++++++------
setup.py | 10 ++++++++++
3 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/ascension/ascension.py b/ascension/ascension.py
index 6a65754..96a1a90 100644
--- a/ascension/ascension.py
+++ b/ascension/ascension.py
@@ -96,7 +96,11 @@ class Ascender():
try:
soa_answer = dns.resolver.query(domain, 'SOA')
except dns.resolver.NoAnswer:
- logging.warning("the domain '%s' does not exist")
+ logging.critical("the domain '%s' does not exist")
+ sys.exit(1)
+ except dns.resolver.NXDOMAIN:
+ logging.critical("the domain '%s' is invalid")
+ sys.exit(1)
master_answer = dns.resolver.query(soa_answer[0].mname, 'A')
try:
if resolver:
@@ -111,6 +115,9 @@ class Ascender():
except dns.exception.FormError:
logging.critical("domain '%s' does not allow xfr requests", domain)
sys.exit(1)
+ except dns.query.TransferError:
+ logging.critical("domain '%s' does not allow xfr requests", domain)
+ sys.exit(1)
for soa_record in zone.iterate_rdatas(rdtype=dns.rdatatype.SOA):
if not cls.transferns:
mname = soa_record[2].mname
@@ -360,11 +367,15 @@ class Ascender():
Extracts the current serial from a given zone
"""
try:
- serial = sp.check_output([GNUNET_NAMESTORE_COMMAND,
+ # this would also work but does not check if record/zone expired
+ #serial = sp.check_output([GNUNET_NAMESTORE_COMMAND,
+ # '-t', 'SOA',
+ # '-z', cls.domain,
+ # '-n', '@',
+ # '-D'])
+ serial = sp.check_output([GNUNET_GNS_COMMAND,
'-t', 'SOA',
- '-z', cls.domain,
- '-n', '@',
- '-D'])
+ '-u', '@.%s' % cls.domain,])
serial = serial.decode()
except sp.CalledProcessError:
serial = ""
@@ -431,10 +442,8 @@ class Ascender():
"""
ret = None
for soarecord in zone.iterate_rdatas(rdtype=dns.rdatatype.SOA):
- # TODO this might need improval depending on which SOA is picked
if str(soarecord[0]) == '@':
ret = soarecord
- break
return ret
@staticmethod
@@ -610,8 +619,8 @@ def main():
while 1:
serial = ascender.get_zone_serial()
ascender.initial_zone_transfer(serial)
- ascender.bootstrap_zone()
ascender.mirror_zone()
+ ascender.bootstrap_zone()
ascender.add_records_to_gns()
logging.info("Finished migrating of the zone %s", ascender.domain)
refresh = int(ascender.get_zone_refresh_time())
diff --git a/requirements.txt b/requirements.txt
index 7babd87..c3ad18c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,8 +1,8 @@
-cffi==1.11.5
-coverage==4.5.1
-dnspython==1.15.0
+coverage==4.5.2
+daemon==1.2
+daemonize==2.5.0
+dnspython==1.16.0
docopt==0.6.2
mock==2.0.0
-pbr==4.2.0
-pycparser==2.18
-six==1.11.0
+pbr==5.1.1
+six==1.12.0
diff --git a/setup.py b/setup.py
index 25ca31c..6a0fd2a 100644
--- a/setup.py
+++ b/setup.py
@@ -25,4 +25,14 @@ setuptools.setup(
'ascension=ascension.ascension:main',
],
},
+ install_requires=[
+ 'coverage',
+ 'daemon',
+ 'daemonize',
+ 'dnspython',
+ 'docopt',
+ 'mock',
+ 'pbr',
+ 'six',
+ ],
)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [ascension] 05/45: initial prototype, bootstrapping zones and zone transfer, (continued)
- [GNUnet-SVN] [ascension] 05/45: initial prototype, bootstrapping zones and zone transfer, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 17/45: updated requirements and README, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 22/45: finished refactoring, fixed a few bugs, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 10/45: added incremental zone transfer logic, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 06/45: working prototype for A, AAAA, MX, CNAME, TXT and more records, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 15/45: created baseclass and separated small from big zones, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 27/45: unstable version, port specification possible, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 28/45: refactored code, added debug mode, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 26/45: added definitive support for IXFR, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 44/45: updated README, cleanup, PEP8, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 43/45: updated dependencies, setup.py, removed TODOs, improved error handling,
gnunet <=
- [GNUnet-SVN] [ascension] 12/45: bumped version to 0.1.0, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 03/45: removed GNU from heading in README, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 02/45: Added LICENSE, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 30/45: updated gnsmigrator and removed c rebuilds, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 08/45: added GNS2DNS support and rudimentary Unittests (incomplete), gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 45/45: renamed files, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 36/45: some experimental fixes, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 34/45: updated gnsmigrator for multiline, added multiline tests, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 35/45: unify all records under label, added SUPPORTED_RECORDS global, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 40/45: improvements, better case separation, more logging, gnunet, 2019/01/25