X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fbin%2Fparsemail.py;h=68bd94cd37174a4f25851f2a2596cea2e56f34d9;hb=4fc6a16910e595401e919abde28cca436193e0dd;hp=7f6727fc79c9d7e7efaf36f303e8f3c2ee188a4d;hpb=74425beba0dc641509c5268571ea5328ac8185ec;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