[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [ascension] 43/57: updated dependencies, setup.py, removed
From: |
gnunet |
Subject: |
[GNUnet-SVN] [ascension] 43/57: updated dependencies, setup.py, removed TODOs, improved error handling |
Date: |
Sat, 13 Apr 2019 13:32:40 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 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] 38/57: renamed project to ascension, (continued)
- [GNUnet-SVN] [ascension] 38/57: renamed project to ascension, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 31/57: added testing for gnunet -K option and more, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 52/57: changed argument -ns to -n, removed gnunet.py, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 46/57: added license headers, GNU coding style guidelines, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 53/57: Add ascension.1, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 34/57: updated gnsmigrator for multiline, added multiline tests, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 41/57: added logic for subzones with zone cut, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 45/57: renamed files, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 48/57: fixed creation zone for non-bailiwick records. bugfixes, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 47/57: updated docstrings, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 43/57: updated dependencies, setup.py, removed TODOs, improved error handling,
gnunet <=
- [GNUnet-SVN] [ascension] 55/57: test/: change a couple of bashisms., gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 56/57: ascension.1: As discussed, change license to gnunet eV defaults (FDL+GPL3)., gnunet, 2019/04/13