Fix dkimverify verbose option so it works and add documentation, thanks to Uwe Kleine-König for the patch (Debian: #1075791), bump version to 1.1.9
This commit is contained in:
+4
-1
@@ -34,15 +34,18 @@ def main():
|
||||
epilog="message to be verified follows commands on stdin")
|
||||
parser.add_argument('--index', metavar='N', type=int, default=0,
|
||||
help='Index of DKIM signature header to verify: default=0')
|
||||
parser.add_argument('-v', '--verbose', default=False, action='store_true',
|
||||
help='Add some debugging output')
|
||||
args=parser.parse_args()
|
||||
if sys.version_info[0] >= 3:
|
||||
# Make sys.stdin a binary stream.
|
||||
sys.stdin = sys.stdin.detach()
|
||||
|
||||
message = sys.stdin.read()
|
||||
verbose = '-v' in sys.argv
|
||||
verbose = args.verbose
|
||||
if verbose:
|
||||
import logging
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
d = dkim.DKIM(message, logger=logging)
|
||||
else:
|
||||
d = dkim.DKIM(message)
|
||||
|
||||
Reference in New Issue
Block a user