Capitalise and unexport dkim.canonicalization.algorithms.

This commit is contained in:
William Grant
2011-06-04 14:38:29 +10:00
parent f8e938c152
commit 3008ad76a7
+3 -4
View File
@@ -22,7 +22,6 @@
import re
__all__ = [
'algorithms',
'CanonicalizationPolicy',
]
@@ -110,8 +109,8 @@ class CanonicalizationPolicy:
m.append(b'simple')
can_headers, can_body = m
try:
header_algorithm = algorithms[can_headers]
body_algorithm = algorithms[can_body]
header_algorithm = ALGORITHMS[can_headers]
body_algorithm = ALGORITHMS[can_body]
except KeyError as e:
if logger:
logger.error(
@@ -130,4 +129,4 @@ class CanonicalizationPolicy:
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))