Python 3 fix & arc cmd line tool fix
This commit is contained in:
+3
-3
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user