From c56a2760a33341374f0f362b9f362e6dce69641d Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Sun, 26 Jun 2016 21:15:50 +0200 Subject: [PATCH] Pylint: enable import-error check --- dns/entropy.py | 6 +++--- dns/resolver.py | 2 +- pylintrc | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dns/entropy.py b/dns/entropy.py index 43841a7a7..5497882ed 100644 --- a/dns/entropy.py +++ b/dns/entropy.py @@ -33,13 +33,13 @@ def __init__(self, seed=None): 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 7d1fa6f86..cf2f54cd7 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -46,7 +46,7 @@ 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 b305bdad8..7051b2c0b 100644 --- a/pylintrc +++ b/pylintrc @@ -30,7 +30,6 @@ disable= fixme, getslice-method, global-statement, - import-error, invalid-name, long-builtin, missing-docstring,