From: Bob Halley Date: Thu, 2 Apr 2020 15:42:24 +0000 (-0700) Subject: delint X-Git-Tag: v2.0.0rc1~314 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ce94357a53265bc30662e11aec63a8fcaf97a2b;p=thirdparty%2Fdnspython.git delint --- diff --git a/dns/dnssec.py b/dns/dnssec.py index 137b9aa6..5fbb5da3 100644 --- a/dns/dnssec.py +++ b/dns/dnssec.py @@ -404,6 +404,7 @@ def _validate_rrsig(rrset, rrsig, keys, origin=None, now=None): elif _is_eddsa(rrsig.algorithm): keyptr = candidate_key.key if not (_have_ecpy and sys.version_info >= (3, 6)): + #pylint: disable=line-too-long raise ImportError('DNSSEC validation for algorithm %u requires ecpy library and Python 3.6 or newer' % rrsig.algorithm) if rrsig.algorithm == ED25519: curve = 'Ed25519' @@ -590,7 +591,7 @@ else: _have_pycrypto = True try: - from ecpy.curves import Curve, Point + from ecpy.curves import Curve from ecpy.keys import ECPublicKey from ecpy.eddsa import EDDSA except ImportError: diff --git a/dns/rdata.py b/dns/rdata.py index 14f41393..f207168c 100644 --- a/dns/rdata.py +++ b/dns/rdata.py @@ -100,7 +100,7 @@ def _constify(o): try: hash(o) return o - except: + except Exception: return tuple(_constify(elt) for elt in o) if type(o) == list: return tuple(_constify(elt) for elt in o)