Capitalise and unexport dkim.canonicalization.algorithms.
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'algorithms',
|
|
||||||
'CanonicalizationPolicy',
|
'CanonicalizationPolicy',
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -110,8 +109,8 @@ class CanonicalizationPolicy:
|
|||||||
m.append(b'simple')
|
m.append(b'simple')
|
||||||
can_headers, can_body = m
|
can_headers, can_body = m
|
||||||
try:
|
try:
|
||||||
header_algorithm = algorithms[can_headers]
|
header_algorithm = ALGORITHMS[can_headers]
|
||||||
body_algorithm = algorithms[can_body]
|
body_algorithm = ALGORITHMS[can_body]
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
if logger:
|
if logger:
|
||||||
logger.error(
|
logger.error(
|
||||||
@@ -130,4 +129,4 @@ class CanonicalizationPolicy:
|
|||||||
return self.body_algorithm.canonicalize_body(body)
|
return self.body_algorithm.canonicalize_body(body)
|
||||||
|
|
||||||
|
|
||||||
algorithms = dict((c.name, c) for c in (Simple, Relaxed))
|
ALGORITHMS = dict((c.name, c) for c in (Simple, Relaxed))
|
||||||
|
|||||||
Reference in New Issue
Block a user