mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-07 14:45:18 +00:00
Merge pull request #4 from daveshah1/fix_filetop
Ignore whitespace at top of file
This commit is contained in:
commit
236f6412c1
|
@ -195,7 +195,8 @@ class SbyJob:
|
||||||
else:
|
else:
|
||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
# print(line)
|
# print(line)
|
||||||
|
if mode is None and (len(line) == 0 or line[0] == "#"):
|
||||||
|
continue
|
||||||
match = re.match(r"^\s*\[(.*)\]\s*$", line)
|
match = re.match(r"^\s*\[(.*)\]\s*$", line)
|
||||||
if match:
|
if match:
|
||||||
entries = match.group(1).split()
|
entries = match.group(1).split()
|
||||||
|
@ -525,4 +526,3 @@ class SbyJob:
|
||||||
with open("%s/%s" % (self.workdir, self.status), "w") as f:
|
with open("%s/%s" % (self.workdir, self.status), "w") as f:
|
||||||
for line in self.summary:
|
for line in self.summary:
|
||||||
print(line, file=f)
|
print(line, file=f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue