diff options
author | Rob Austein <sra@hactrn.net> | 2015-11-11 03:22:38 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-11-11 03:22:38 +0000 |
commit | 9f6d6462a9cef37735a9d4c61921d04934fd9864 (patch) | |
tree | e5d1b046f6f6bd44faf1b5028f6f1df9698e2a88 /rpki/rtr/generator.py | |
parent | ac415cdd0f88f8479975627772dd0a84797b261a (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/generator.py')
-rw-r--r-- | rpki/rtr/generator.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/rpki/rtr/generator.py b/rpki/rtr/generator.py index e00e44b7..a879cc39 100644 --- a/rpki/rtr/generator.py +++ b/rpki/rtr/generator.py @@ -105,6 +105,11 @@ class RouterKeyPDU(rpki.rtr.pdus.RouterKeyPDU): Router Key PDU. """ + announce = None + ski = None + asn = None + key = None + @classmethod def from_text(cls, version, asn, gski, key): """ @@ -140,14 +145,15 @@ class ROA(rpki.POW.ROA): # pylint: disable=W0232 """ @classmethod - def derReadFile(cls, fn): # pylint: disable=E1002 + def derReadFile(cls, fn): + # pylint: disable=E1002 self = super(ROA, cls).derReadFile(fn) self.extractWithoutVerifying() return self @property def prefixes(self): - v4, v6 = self.getPrefixes() + v4, v6 = self.getPrefixes() # pylint: disable=E1101 if v4 is not None: for p in v4: yield p @@ -162,7 +168,7 @@ class X509(rpki.POW.X509): # pylint: disable=W0232 @property def asns(self): - resources = self.getRFC3779() + resources = self.getRFC3779() # pylint: disable=E1101 if resources is not None and resources[0] is not None: for min_asn, max_asn in resources[0]: for asn in xrange(min_asn, max_asn + 1): @@ -215,6 +221,8 @@ class AXFRSet(PDUSet): field set. """ + serial = None + @classmethod def parse_rcynic(cls, rcynic_dir, version, scan_roas = None, scan_routercerts = None): """ @@ -245,7 +253,7 @@ class AXFRSet(PDUSet): self.extend(PrefixPDU.from_roa(version = version, asn = asn, prefix_tuple = prefix_tuple) for prefix_tuple in roa.prefixes) if include_routercerts and scan_routercerts is None and fn.endswith(".cer"): - x = X509.derReadFile(os.path.join(root, fn)) + x = X509.derReadFile(os.path.join(root, fn)) # pylint: disable=E1101 eku = x.getEKU() if eku is not None and rpki.oids.id_kp_bgpsec_router in eku: ski = x.getSKI() @@ -415,6 +423,9 @@ class IXFRSet(PDUSet): indicate the changes. """ + from_serial = None + to_serial = None + @classmethod def load(cls, filename): """ |