prefix_re = re.compile(r'^\[([^\]]*)\]\s*(.*)$')
subject = clean_header(subject)
- if not subject:
+ if subject is None:
raise ValueError("Invalid 'Subject' header")
if drop_prefixes is None:
--- /dev/null
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Subject:
+Date: Tue, 8 Oct 2013 22:09:47 +0000
+Message-ID: <ABC@DEF>
+
+Rename patches to follow standard naming scheme.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+ ...d-pkgconfig-files.patch => rpi-userland-000-add-pkgconfig-files.patch} | 0
+ ...erland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch} | 0
+ 2 files changed, 0 insertions(+), 0 deletions(-)
+ rename package/rpi-userland/{rpi-userland-add-pkgconfig-files.patch => rpi-userland-000-add-pkgconfig-files.patch} (100%)
+ rename package/rpi-userland/{rpi-userland-makefiles-0001-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch => rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch} (100%)
+
+diff --git a/package/rpi-userland/rpi-userland-add-pkgconfig-files.patch b/package/rpi-userland/rpi-userland-000-add-pkgconfig-files.patch
+similarity index 100%
+rename from package/rpi-userland/rpi-userland-add-pkgconfig-files.patch
+rename to package/rpi-userland/rpi-userland-000-add-pkgconfig-files.patch
+diff --git a/package/rpi-userland/rpi-userland-makefiles-0001-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch b/package/rpi-userland/rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch
+similarity index 100%
+rename from package/rpi-userland/rpi-userland-makefiles-0001-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch
+rename to package/rpi-userland/rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch
+--
+1.8.1.2
# Confirm we got both markers
self.assertEqual(2, diff.count('\ No newline at end of file'))
+ def test_no_subject(self):
+ """Validate parsing a mail with no subject."""
+ diff, message = self._find_content('0016-no-subject.mbox')
+ self.assertTrue(diff is not None)
+ self.assertTrue(message is not None)
+
class EncodingParseTest(TestCase):
"""Test parsing of patches with different encoding issues."""