Fix bare except statements for expected ImportErrors
This commit is contained in:
committed by
Scott Kitterman
parent
229ac42db9
commit
0338aedcc6
+3
-3
@@ -41,14 +41,14 @@ import time
|
||||
# only needed for arc
|
||||
try:
|
||||
from authres import AuthenticationResultsHeader
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# only needed for ed25519 signing/verification
|
||||
try:
|
||||
import nacl.signing
|
||||
import nacl.encoding
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from dkim.canonicalization import (
|
||||
@@ -68,7 +68,7 @@ from dkim.crypto import (
|
||||
)
|
||||
try:
|
||||
from dkim.dnsplug import get_txt
|
||||
except:
|
||||
except ImportError:
|
||||
def get_txt(s):
|
||||
raise RuntimeError("DKIM.verify requires DNS or dnspython module")
|
||||
from dkim.util import (
|
||||
|
||||
Reference in New Issue
Block a user