aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gbp/patch_series.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gbp/patch_series.py b/gbp/patch_series.py
index 4ce0327f..04e495f4 100644
--- a/gbp/patch_series.py
+++ b/gbp/patch_series.py
@@ -334,6 +334,7 @@ class PatchSeries(list):
>>> PatchSeries._read_series(['a/b',
... 'a -p1 # comment',
+ ... ' ',
... 'a/b -p2'], '.')
... # doctest:+NORMALIZE_WHITESPACE
[<gbp.patch_series.Patch path='./a/b' topic='a' >,
@@ -349,8 +350,11 @@ class PatchSeries(list):
@type patch_dir: string
"""
queue = PatchSeries()
+ ws = re.compile('^\\s+$')
for line in series:
try:
+ if ws.match(line):
+ continue
if line[0] in ['\n', '#']:
continue
except IndexError: