dkim.canonicalization now has an algorithms dict mapping names to algorithms. Use it.

This commit is contained in:
William Grant
2011-06-03 21:52:33 +10:00
parent a1fc55bcaa
commit 28aaa6f2f2
2 changed files with 19 additions and 26 deletions
+3
View File
@@ -64,3 +64,6 @@ class Relaxed:
# Ignore all empty lines at the end of the message body.
removed_trailing_lines = re.sub(b"(\r\n)*$", b"\r\n", compressed_wsp)
return removed_trailing_lines
algorithms = dict((c.name, c) for c in (Simple, Relaxed))