From: Martin Basti Date: Sun, 26 Jun 2016 19:15:50 +0000 (+0200) Subject: Pylint: enable import-error check X-Git-Tag: v1.15.0~42^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c56a2760a33341374f0f362b9f362e6dce69641d;p=thirdparty%2Fdnspython.git Pylint: enable import-error check --- diff --git a/dns/entropy.py b/dns/entropy.py index 43841a7a..5497882e 100644 --- a/dns/entropy.py +++ b/dns/entropy.py @@ -33,13 +33,13 @@ class EntropyPool(object): import hashlib self.hash = hashlib.sha1() self.hash_len = 20 - except: + except ImportError: try: import sha self.hash = sha.new() self.hash_len = 20 - except: - import md5 + except ImportError: + import md5 # pylint: disable=import-error self.hash = md5.new() self.hash_len = 16 self.pool = bytearray(b'\0' * self.hash_len) diff --git a/dns/resolver.py b/dns/resolver.py index 7d1fa6f8..cf2f54cd 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -46,7 +46,7 @@ if sys.platform == 'win32': try: import winreg as _winreg except ImportError: - import _winreg + import _winreg # pylint: disable=import-error class NXDOMAIN(dns.exception.DNSException): diff --git a/pylintrc b/pylintrc index b305bdad..7051b2c0 100644 --- a/pylintrc +++ b/pylintrc @@ -30,7 +30,6 @@ disable= fixme, getslice-method, global-statement, - import-error, invalid-name, long-builtin, missing-docstring,