X-Git-Url: https://git.ozlabs.org/?p=patchwork;a=blobdiff_plain;f=apps%2Fpatchwork%2Fparser.py;h=a51a7b609af0c1df36a85f0d9fac4670efd9322e;hp=82959803adad45e8de0ee768ddd8e8c534cf1ca1;hb=f09e982f58384946111d4157fd2b7c2b31b78612;hpb=3dbec78dbd8e80729cf208d1e68f550b7d7ba5a9 diff --git a/apps/patchwork/parser.py b/apps/patchwork/parser.py index 8295980..a51a7b6 100644 --- a/apps/patchwork/parser.py +++ b/apps/patchwork/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # Patchwork - automated patch tracking system # Copyright (C) 2008 Jeremy Kerr @@ -126,6 +126,11 @@ def parse_patch(text): buf = '' state = 2 + elif hunk and line.startswith('\ No newline at end of file'): + # If we had a hunk and now we see this, it's part of the patch, + # and we're still expecting another @@ line. + patchbuf += line + elif hunk: state = 1 buf += line