]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/bin/parsemail.py
[parser] Don't remove --- update lines
[patchwork] / apps / patchwork / bin / parsemail.py
index 3fbe4735101c31e31a4d5b6c9384e910b062f339..b0f1497656ab8ac4170c93f34975454b4f9b0fad 100755 (executable)
@@ -103,7 +103,6 @@ def find_author(mail):
 def mail_date(mail):
     t = parsedate_tz(mail.get('Date', ''))
     if not t:
-        print "using now()"
         return datetime.datetime.utcnow()
     return datetime.datetime.utcfromtimestamp(mktime_tz(t))
 
@@ -299,8 +298,9 @@ def clean_subject(subject, drop_prefixes = None):
 
     return subject
 
-sig_re = re.compile('^(-{2,3} ?|_+)\n.*', re.S | re.M)
+sig_re = re.compile('^(-|_+)\n.*', re.S | re.M)
 def clean_content(str):
+    """ Try to remove signature (-- ) and list footer (_____) cruft """
     str = sig_re.sub('', str)
     return str.strip()