From 7456fffcea1760e968ffb4bfca466d60815b14a7 Mon Sep 17 00:00:00 2001 From: Gene Shuman Date: Mon, 27 Feb 2017 16:16:20 -0800 Subject: [PATCH] python3.4 cant interpolate tuples into byte strings --- ChangeLog | 2 +- dkim/__init__.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 972feb7..7c0fb03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ UNRELEASED Version 0.6.2 - + - Fixed python3.4 string interpolation issue 2017-01-27 Version 0.6.1 - Fixed python3 dns lookup issue diff --git a/dkim/__init__.py b/dkim/__init__.py index 6e7d473..480045d 100644 --- a/dkim/__init__.py +++ b/dkim/__init__.py @@ -508,7 +508,7 @@ class DomainSigner(object): idx = [i for i in range(len(fields)) if fields[i][0] == b'b'][0] fields[idx] = (b'b', base64.b64encode(bytes(sig2))) header_value = b"; ".join(b"=".join(x) for x in fields) + b"\r\n" - + if not standardize: header_value = fold(header_value) @@ -810,7 +810,7 @@ class ARC(DomainSigner): arc_headers = [y for x,y in arc_headers_w_instance] # Compute ARC-Authentication-Results - aar_value = b"i=%d; %s" % (instance, auth_results) + aar_value = (b"i=%d; " % instance) + auth_results if aar_value[-1] != b'\n': aar_value += b'\r\n' new_arc_set.append(b"ARC-Authentication-Results: " + aar_value) @@ -1080,4 +1080,3 @@ def arc_verify(message, logger=None, dnsfunc=get_txt, minkey=1024): if logger is not None: logger.error("%s" % x) return CV_Fail, [], "%s" % x -