From a7cad7f4aab21d48eb783935dfabb9859bcc4f37 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 31 May 2014 18:32:19 +0000 Subject: Still more PyLint. svn path=/trunk/; revision=5856 --- rp/utils/find_roa | 10 ++++------ rp/utils/hashdir | 6 +++--- rp/utils/print_roa | 8 +++----- rp/utils/print_rpki_manifest | 8 +++----- rp/utils/scan_roas | 6 +++--- rp/utils/scan_routercerts | 6 +++--- rp/utils/uri | 9 ++++----- 7 files changed, 23 insertions(+), 30 deletions(-) (limited to 'rp/utils') diff --git a/rp/utils/find_roa b/rp/utils/find_roa index 1fc0af3d..4cfcccac 100755 --- a/rp/utils/find_roa +++ b/rp/utils/find_roa @@ -1,13 +1,13 @@ #!/usr/bin/env python # # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") -# +# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. -# +# # THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -22,8 +22,6 @@ matching specified prefixes. """ import os -import sys -import base64 import argparse import rpki.POW import rpki.oids @@ -54,7 +52,7 @@ class Prefix(object): def __init__(self, val): addr, length = val.split("/") - length, sep, maxlength = length.partition("-") + length, sep, maxlength = length.partition("-") # pylint: disable=W0612 self.prefix = rpki.POW.IPAddress(addr) self.length = int(length) self.maxlength = int(maxlength) if maxlength else self.length diff --git a/rp/utils/hashdir b/rp/utils/hashdir index 2f02cd3b..d3fe393c 100755 --- a/rp/utils/hashdir +++ b/rp/utils/hashdir @@ -1,13 +1,13 @@ #!/usr/bin/env python # # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") -# +# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. -# +# # THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT, diff --git a/rp/utils/print_roa b/rp/utils/print_roa index fd7308d1..d5db0c3c 100755 --- a/rp/utils/print_roa +++ b/rp/utils/print_roa @@ -1,13 +1,13 @@ #!/usr/bin/env python # # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") -# +# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. -# +# # THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -21,8 +21,6 @@ Pretty-print the content of a ROA. Does NOT attempt to verify the signature. """ -import os -import sys import argparse import rpki.POW diff --git a/rp/utils/print_rpki_manifest b/rp/utils/print_rpki_manifest index 778b4310..5ebc6356 100755 --- a/rp/utils/print_rpki_manifest +++ b/rp/utils/print_rpki_manifest @@ -1,13 +1,13 @@ #!/usr/bin/env python # # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") -# +# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. -# +# # THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -21,8 +21,6 @@ Pretty-print the content of a manifest. Does NOT attempt to verify the signature. """ -import os -import sys import argparse import rpki.POW import rpki.oids diff --git a/rp/utils/scan_roas b/rp/utils/scan_roas index 1f5746b1..a1b64f01 100755 --- a/rp/utils/scan_roas +++ b/rp/utils/scan_roas @@ -1,13 +1,13 @@ #!/usr/bin/env python # # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") -# +# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. -# +# # THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT, diff --git a/rp/utils/scan_routercerts b/rp/utils/scan_routercerts index aa3ed9e6..081a6293 100755 --- a/rp/utils/scan_routercerts +++ b/rp/utils/scan_routercerts @@ -1,12 +1,12 @@ #!/usr/bin/env python # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") -# +# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. -# +# # THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT, diff --git a/rp/utils/uri b/rp/utils/uri index e095eb30..e72d5e0d 100755 --- a/rp/utils/uri +++ b/rp/utils/uri @@ -1,13 +1,13 @@ #!/usr/bin/env python # # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") -# +# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. -# +# # THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -24,7 +24,6 @@ Input files must be in DER format and may be either X.509v3 certificates or CMS objects which contain X.509v3 certificates in the CMS wrapper. """ -import os import argparse import rpki.POW @@ -41,7 +40,7 @@ class Certificate(object): def __init__(self, fn): try: x = rpki.POW.X509.derReadFile(fn) - except: + except: # pylint: disable=W0702 try: cms = rpki.POW.CMS.derReadFile(fn) cms.extractWithoutVerifying() -- cgit v1.2.3