Skip to content
Snippets Groups Projects
Commit 9f204083 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: Make vest loader a bit more lenient

parent 2aa93074
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,16 @@ def looksLikeVestLutFile(path):
``False`` otherwise.
"""
with open(path, 'rt') as f:
return f.readline().strip() == '%!VEST-LUT'
lines = []
for i in range(10):
line = f.readline()
if line is None: break
else: lines.append(line.strip())
validHeaders = ('%!VEST-LUT', '%BeginInstance', '%%BeginInstance')
return len(lines) > 0 and lines[0] in validHeaders
def loadVestLutFile(path, normalise=True):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment