Ignore whitespace at top of file
authorDavid Shah <davey1576@gmail.com>
Mon, 22 Jan 2018 13:00:32 +0000 (13:00 +0000)
committerDavid Shah <davey1576@gmail.com>
Mon, 22 Jan 2018 13:00:32 +0000 (13:00 +0000)
Signed-off-by: David Shah <davey1576@gmail.com>
sbysrc/sby_core.py

index 10b45fd1526c9a5b4a5c1f68871cb56a8e54cc0a..3cb37b5d5da7b8a2d3338b5194958f5e45a747bd 100644 (file)
@@ -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)
-