From c6d25f004591725d60eabf621c5c80aa97765e61 Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 22 Jan 2018 13:00:32 +0000 Subject: [PATCH] Ignore whitespace at top of file Signed-off-by: David Shah --- sbysrc/sby_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 10b45fd..3cb37b5 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -195,7 +195,8 @@ class SbyJob: else: line = line.rstrip() # print(line) - + if mode is None and (len(line) == 0 or line[0] == "#"): + continue match = re.match(r"^\s*\[(.*)\]\s*$", line) if match: entries = match.group(1).split() @@ -525,4 +526,3 @@ class SbyJob: with open("%s/%s" % (self.workdir, self.status), "w") as f: for line in self.summary: print(line, file=f) - -- 2.30.2