From 9f6d6462a9cef37735a9d4c61921d04934fd9864 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 11 Nov 2015 03:22:38 +0000 Subject: 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 --- rp/utils/print_roa | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'rp/utils/print_roa') diff --git a/rp/utils/print_roa b/rp/utils/print_roa index 78ae244f..dd13447d 100755 --- a/rp/utils/print_roa +++ b/rp/utils/print_roa @@ -26,6 +26,9 @@ import rpki.POW class ROA(rpki.POW.ROA): # pylint: disable=W0232 + v4_prefixes = None + v6_prefixes = None + @staticmethod def _format_prefix(p): if p[2] in (None, p[1]): @@ -34,8 +37,8 @@ class ROA(rpki.POW.ROA): # pylint: disable=W0232 return "%s/%d-%d" % (p[0], p[1], p[2]) def parse(self): - self.extractWithoutVerifying() - v4, v6 = self.getPrefixes() + self.extractWithoutVerifying() # pylint: disable=E1101 + v4, v6 = self.getPrefixes() # pylint: disable=E1101 self.v4_prefixes = [self._format_prefix(p) for p in (v4 or ())] self.v6_prefixes = [self._format_prefix(p) for p in (v6 or ())] @@ -43,7 +46,7 @@ parser = argparse.ArgumentParser(description = __doc__) parser.add_argument("-b", "--brief", action = "store_true", help = "show only ASN and prefix(es)") parser.add_argument("-c", "--cms", action = "store_true", help = "print text representation of entire CMS blob") parser.add_argument("-s", "--signing-time", action = "store_true", help = "show SigningTime in brief mode") -parser.add_argument("roas", nargs = "+", type = ROA.derReadFile, help = "ROA(s) to print") +parser.add_argument("roas", nargs = "+", type = ROA.derReadFile, help = "ROA(s) to print") # pylint: disable=E1101 args = parser.parse_args() for roa in args.roas: -- cgit v1.2.3