diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-02-24 13:47:42 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-02-24 15:45:28 +0000 |
commit | b57d80da7765b2f06ba37758c05819456c27d0b9 (patch) | |
tree | 393463d344c485c0975e46a09b5b95d0d6b38165 /src/gallium/auxiliary | |
parent | 78f72d73ee37c1a269f010e492631503a7fc35b2 (diff) |
util: Allow '#' comments in u_format.csv.
Diffstat (limited to 'src/gallium/auxiliary')
-rwxr-xr-x | src/gallium/auxiliary/util/u_format_parse.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_format_parse.py b/src/gallium/auxiliary/util/u_format_parse.py index 5d49fc7652..37336029d8 100755 --- a/src/gallium/auxiliary/util/u_format_parse.py +++ b/src/gallium/auxiliary/util/u_format_parse.py @@ -137,7 +137,15 @@ def parse(filename): stream = open(filename) formats = [] for line in stream: - line = line.rstrip() + try: + comment = line.index('#') + except ValueError: + pass + else: + line = line[:comment] + line = line.strip() + if not line: + continue fields = [field.strip() for field in line.split(',')] name = fields[0] layout = fields[1] |