/[soft]/mga-gnome/trunk/mga-gnome
ViewVC logotype

Diff of /mga-gnome/trunk/mga-gnome

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3180 by ovitters, Fri Mar 2 21:25:11 2012 UTC revision 3384 by ovitters, Sun Mar 11 13:15:23 2012 UTC
# Line 628  def cmd_parse_ftp_release_list(options, Line 628  def cmd_parse_ftp_release_list(options,
628          """Send an reply email"""          """Send an reply email"""
629          contents.seek(0)          contents.seek(0)
630          msg = MIMEText(contents.read(), _charset='utf-8')          msg = MIMEText(contents.read(), _charset='utf-8')
631          msg['Subject'] = "Re: %s%s" % (orig_msg['Subject'], " (ERROR)" if error else "")          if error:
632                # XXX - ugly
633                contents.seek(0)
634                lastline = contents.read().splitlines()[-1]
635                # Remove things like "ERROR: " and so on from the last line
636                lastline = re.sub(r'^(?:[^ :]+:\s+)+', '', lastline)
637                subjecterrror = " (ERROR: %s)" % lastline if lastline else " (ERROR)"
638            else:
639                subjecterror = ""
640            msg['Subject'] = "Re: %s%s" (orig_msg['Subject'], subjecterror)
641          msg['To'] = to          msg['To'] = to
642          msg["In-Reply-To"] = orig_msg["Message-ID"]          msg["In-Reply-To"] = orig_msg["Message-ID"]
643          msg["References"] = orig_msg["Message-ID"]          msg["References"] = orig_msg["Message-ID"]

Legend:
Removed from v.3180  
changed lines
  Added in v.3384

  ViewVC Help
Powered by ViewVC 1.1.30