]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Pylint: enable import-error check
authorMartin Basti <martin.basti@gmail.com>
Sun, 26 Jun 2016 19:15:50 +0000 (21:15 +0200)
committerMartin Basti <martin.basti@gmail.com>
Sun, 26 Jun 2016 23:35:48 +0000 (01:35 +0200)
dns/entropy.py
dns/resolver.py
pylintrc

index 43841a7a7522fa84e118853db5e1f13216800cd9..5497882edc98b799b010c52406b119d20a5f41cd 100644 (file)
@@ -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)
index 7d1fa6f86f28664045ce5d76009cc32966dfa38d..cf2f54cd766baafc8d692871cd2822d01d5f4aa2 100644 (file)
@@ -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):
 
index b305bdad838f7534cc377863fcb6d161cfd20999..7051b2c0bf9aca030a81ffb67cf09728d3c56afc 100644 (file)
--- a/pylintrc
+++ b/pylintrc
@@ -30,7 +30,6 @@ disable=
     fixme,
     getslice-method,
     global-statement,
-    import-error,
     invalid-name,
     long-builtin,
     missing-docstring,