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
|
# only needed for arc
|
||||||
try:
|
try:
|
||||||
from authres import AuthenticationResultsHeader
|
from authres import AuthenticationResultsHeader
|
||||||
except:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# only needed for ed25519 signing/verification
|
# only needed for ed25519 signing/verification
|
||||||
try:
|
try:
|
||||||
import nacl.signing
|
import nacl.signing
|
||||||
import nacl.encoding
|
import nacl.encoding
|
||||||
except:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from dkim.canonicalization import (
|
from dkim.canonicalization import (
|
||||||
@@ -68,7 +68,7 @@ from dkim.crypto import (
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
from dkim.dnsplug import get_txt
|
from dkim.dnsplug import get_txt
|
||||||
except:
|
except ImportError:
|
||||||
def get_txt(s):
|
def get_txt(s):
|
||||||
raise RuntimeError("DKIM.verify requires DNS or dnspython module")
|
raise RuntimeError("DKIM.verify requires DNS or dnspython module")
|
||||||
from dkim.util import (
|
from dkim.util import (
|
||||||
|
|||||||
Reference in New Issue
Block a user