aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2010-02-05 13:44:55 +0000
committerCatalin Marinas <catalin.marinas@gmail.com>2010-02-05 13:44:55 +0000
commitc18d3a36b607c5320e0fc4d97e3cd0a03f3776a4 (patch)
tree27dca392189a6a35fb4a2461efec34e50a3cb362
parent89d7ec43e0b25cc6cbc9feb044d7ce7048f224eb (diff)
downloadstgit-c18d3a36b607c5320e0fc4d97e3cd0a03f3776a4.tar.gz
stg mail: reorder __build_[message|cover] parameters
Reorder the argument lists for both __build_cover and __build_message. This change will aid readability of a subsequent refactoring patch. Cc: Karl Wiberg <kha@treskal.com> Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
-rw-r--r--stgit/commands/mail.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index 91e89ff..a211c82 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -370,7 +370,7 @@ def __edit_message(msg):
return msg
-def __build_cover(tmpl, patches, msg_id, options):
+def __build_cover(tmpl, msg_id, options, patches):
"""Build the cover message (series description) to be sent via SMTP
"""
sender = __get_sender()
@@ -439,7 +439,7 @@ def __build_cover(tmpl, patches, msg_id, options):
return msg
-def __build_message(tmpl, patch, patch_nr, total_nr, msg_id, ref_id, options):
+def __build_message(tmpl, msg_id, options, patch, patch_nr, total_nr, ref_id):
"""Build the message to be sent via SMTP
"""
p = crt_series.get_patch(patch)
@@ -600,7 +600,7 @@ def func(parser, options, args):
raise CmdException, 'No cover message template file found'
msg_id = email.Utils.make_msgid('stgit')
- msg = __build_cover(tmpl, patches, msg_id, options)
+ msg = __build_cover(tmpl, msg_id, options, patches)
from_addr, to_addr_list = __parse_addresses(msg)
msg_string = msg.as_string(options.mbox)
@@ -630,8 +630,8 @@ def func(parser, options, args):
for (p, patch_nr) in zip(patches, range(1, total_nr + 1)):
msg_id = email.Utils.make_msgid('stgit')
- msg = __build_message(tmpl, p, patch_nr, total_nr, msg_id, ref_id,
- options)
+ msg = __build_message(tmpl, msg_id, options, p, patch_nr, total_nr,
+ ref_id)
from_addr, to_addr_list = __parse_addresses(msg)
msg_string = msg.as_string(options.mbox)