X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=apps%2Fpatchwork%2Fbin%2Fparsemail.py;h=68bd94cd37174a4f25851f2a2596cea2e56f34d9;hb=7d9334e879857f8a380bc9509b6cbf9972cecc25;hp=7f6727fc79c9d7e7efaf36f303e8f3c2ee188a4d;hpb=d9afef53a2102e5a4deba9953749e2bb5c8df486;p=patchwork diff --git a/apps/patchwork/bin/parsemail.py b/apps/patchwork/bin/parsemail.py index 7f6727f..68bd94c 100755 --- a/apps/patchwork/bin/parsemail.py +++ b/apps/patchwork/bin/parsemail.py @@ -57,11 +57,17 @@ def clean_header(header): def find_project(mail): project = None - listid_re = re.compile('.*<([^>]+)>.*', re.S) + listid_res = [re.compile('.*<([^>]+)>.*', re.S), + re.compile('^([\S]+)$', re.S)] for header in list_id_headers: if header in mail: - match = listid_re.match(mail.get(header)) + + for listid_re in listid_res: + match = listid_re.match(mail.get(header)) + if match: + break + if not match: continue