(Steve Dougherty)
2013-07-09: Fix aborting pull request on empty message. Fix aborting pull request on empty message.
diff --git a/infocalypse/wot.py b/infocalypse/wot.py --- a/infocalypse/wot.py +++ b/infocalypse/wot.py @@ -63,13 +63,13 @@ HG: Following lines are the body of the """.format(VCS_PREFIX), from_identifier) # TODO: Save message and load later in case sending fails. - if not source_text: - raise util.Abort("Empty pull request message.") - source_lines = source_text.splitlines() source_lines = [line for line in source_lines if not line.startswith('HG:')] + if not ''.join(source_lines).strip(): + raise util.Abort("Empty pull request message.") + # Body is third line and after. msg = MIMEText('\n'.join(source_lines[2:]) + footer) msg['Subject'] = VCS_PREFIX + source_lines[0]