]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/bin/parsemail.py
[parser] Accept x-diff patches
[patchwork] / apps / patchwork / bin / parsemail.py
index 2acceb5836a871835a42eff65f99360e078b6823..d73343a9407fd5a0c36f2af0604f414189f3595c 100755 (executable)
@@ -138,11 +138,12 @@ def find_content(project, mail):
             continue
 
         payload = part.get_payload(decode=True)
+        subtype = part.get_content_subtype()
 
-        if part.get_content_subtype() == 'x-patch':
+        if subtype in ['x-patch', 'x-diff']:
             patchbuf = payload
 
-        if part.get_content_subtype() == 'plain':
+        elif subtype == 'plain':
             if not patchbuf:
                 (patchbuf, c) = parse_patch(payload)
             else: