ajoute une option verbose
This commit is contained in:
parent
4ae4b7fe87
commit
166f4298f9
@ -53,6 +53,9 @@ def parse_args():
|
|||||||
action="store_true",
|
action="store_true",
|
||||||
help="Load data but don't send anything.",
|
help="Load data but don't send anything.",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-v", "--verbose", action="store_true",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-a",
|
"-a",
|
||||||
"--attachement",
|
"--attachement",
|
||||||
@ -180,6 +183,10 @@ def send_message(message, to, attachment, args):
|
|||||||
if attachment:
|
if attachment:
|
||||||
msg.add_attachment(attachment[0], **attachment[1])
|
msg.add_attachment(attachment[0], **attachment[1])
|
||||||
|
|
||||||
|
if args.verbose:
|
||||||
|
print(msg)
|
||||||
|
print("-" * 80)
|
||||||
|
else:
|
||||||
print(
|
print(
|
||||||
"Sending : %s, from %s to %s, dests : %s"
|
"Sending : %s, from %s to %s, dests : %s"
|
||||||
% (subjectvalue, fromvalue, dests[0], repr(dests))
|
% (subjectvalue, fromvalue, dests[0], repr(dests))
|
||||||
|
Loading…
Reference in New Issue
Block a user