python3 fix + arc cmd tool fix

This commit is contained in:
Gene Shuman
2017-01-23 17:07:42 -08:00
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -1,4 +1,5 @@
UNRELEASED Version 0.6.1 UNRELEASED Version 0.6.1
- Fixed python3 dns lookup issue
2017-01-23 Version 0.6.0 2017-01-23 Version 0.6.0
- Add capability to sign and verify ARC signatures - Add capability to sign and verify ARC signatures
+3 -3
View File
@@ -40,10 +40,10 @@ message = sys.stdin.read()
verbose = '-v' in sys.argv verbose = '-v' in sys.argv
if verbose: if verbose:
logging.basicConfig(level=10) logging.basicConfig(level=10)
d = dkim.ARC(message) a = dkim.ARC(message)
cv, results, comment = d.verify() cv, results, comment = a.verify()
else: else:
cv, results, comment = arc.verify(message) cv, results, comment = dkim.arc_verify(message)
print("arc verification: cv=%s %s" % (cv, comment)) print("arc verification: cv=%s %s" % (cv, comment))
if verbose: if verbose:
+1 -1
View File
@@ -80,6 +80,6 @@ def get_txt(name):
except UnicodeDecodeError: except UnicodeDecodeError:
return None return None
txt = _get_txt(unicode_name) txt = _get_txt(unicode_name)
if txt: if type(txt) is str:
txt = txt.encode('utf-8') txt = txt.encode('utf-8')
return txt return txt