chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor message printing
[stgit]
/
stgit
/
commands
/
mail.py
diff --git
a/stgit/commands/mail.py
b/stgit/commands/mail.py
index 2fcaa5f629429f1c1c669682eafbd9056a7ecc12..1ca6ba24ccb3ae18b6a8e668a856c49cbcd25b42 100644
(file)
--- a/
stgit/commands/mail.py
+++ b/
stgit/commands/mail.py
@@
-500,13
+500,12
@@
def func(parser, options, args):
ref_id = msg_id
if options.mbox:
ref_id = msg_id
if options.mbox:
- print msg_string
+ out.stdout_raw(msg_string + '\n')
else:
else:
- print 'Sending the cover message...',
- sys.stdout.flush()
+ out.start('Sending the cover message')
__send_message(smtpserver, from_addr, to_addr_list, msg_string,
sleep, smtpuser, smtppassword)
__send_message(smtpserver, from_addr, to_addr_list, msg_string,
sleep, smtpuser, smtppassword)
- print 'done'
+ out.done()
# send the patches
if options.template:
# send the patches
if options.template:
@@
-529,10
+528,9
@@
def func(parser, options, args):
ref_id = msg_id
if options.mbox:
ref_id = msg_id
if options.mbox:
- print msg_string
+ out.stdout_raw(msg_string + '\n')
else:
else:
- print 'Sending patch "%s"...' % p,
- sys.stdout.flush()
+ out.start('Sending patch "%s"' % p)
__send_message(smtpserver, from_addr, to_addr_list, msg_string,
sleep, smtpuser, smtppassword)
__send_message(smtpserver, from_addr, to_addr_list, msg_string,
sleep, smtpuser, smtppassword)
- print 'done'
+ out.done()