aboutsummaryrefslogtreecommitdiff
path: root/rpki/rtr/bgpdump.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-11-11 03:22:38 +0000
committerRob Austein <sra@hactrn.net>2015-11-11 03:22:38 +0000
commit9f6d6462a9cef37735a9d4c61921d04934fd9864 (patch)
treee5d1b046f6f6bd44faf1b5028f6f1df9698e2a88 /rpki/rtr/bgpdump.py
parentac415cdd0f88f8479975627772dd0a84797b261a (diff)
Configure pylint to use the pylint-django plugin, which (mostly)
understands Django's exotic metaclasses, which in turn allows us to re-enable a number of pylint checks we had disabled. While we were at this, stripped out a bunch of old pylint pragmas, then added back the subset that were really needed. As usual with pylint, this turned up a few real bugs along with an awful lot of noise. svn path=/branches/tk705/; revision=6162
Diffstat (limited to 'rpki/rtr/bgpdump.py')
-rwxr-xr-xrpki/rtr/bgpdump.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/rpki/rtr/bgpdump.py b/rpki/rtr/bgpdump.py
index 3336fb9f..1ca04803 100755
--- a/rpki/rtr/bgpdump.py
+++ b/rpki/rtr/bgpdump.py
@@ -91,6 +91,8 @@ class PrefixPDU(rpki.rtr.generator.PrefixPDU):
class AXFRSet(rpki.rtr.generator.AXFRSet):
+ serial = None
+
@staticmethod
def read_bgpdump(filename):
assert filename.endswith(".bz2")
@@ -101,6 +103,7 @@ class AXFRSet(rpki.rtr.generator.AXFRSet):
@classmethod
def parse_bgpdump_rib_dump(cls, filename):
+ # pylint: disable=W0201
assert os.path.basename(filename).startswith("ribs.")
self = cls()
self.serial = None
@@ -212,7 +215,7 @@ def bgpdump_select_main(args):
nonce = rpki.rtr.server.read_current(version)[1]
if nonce is None:
- nonce = rpki.rtr.generator.new_nonce()
+ nonce = rpki.rtr.generator.AXFRSet.new_nonce(force_zero_nonce = False)
rpki.rtr.server.write_current(serial, nonce, version)
rpki.rtr.generator.kick_all(serial)
@@ -238,7 +241,7 @@ class BGPDumpReplayClock(object):
self.timestamps = [Timestamp(int(f.split(".")[0])) for f in glob.iglob("*.ax.v*")]
self.timestamps.sort()
self.offset = self.timestamps[0] - int(time.time())
- self.nonce = rpki.rtr.generator.new_nonce()
+ self.nonce = rpki.rtr.generator.AXFRSet.new_nonce(force_zero_nonce = False)
def __nonzero__(self):
return len(self.timestamps) > 0
@@ -278,7 +281,7 @@ def bgpdump_server_main(args):
You have been warned.
"""
- logger = logging.LoggerAdapter(logging.root, dict(connection = rpki.rtr.server._hostport_tag()))
+ logger = logging.LoggerAdapter(logging.root, dict(connection = rpki.rtr.server.hostport_tag()))
logger.debug("[Starting]")