Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 6f1fe1a3 authored by usov_i's avatar usov_i
Browse files

Correctly strip lines in read_cfl_file

parent 8d4f4a9b
No related branches found
No related tags found
No related merge requests found
...@@ -170,6 +170,7 @@ def read_cfl_file(fileobj): ...@@ -170,6 +170,7 @@ def read_cfl_file(fileobj):
params = {"SPGR": None, "CELL": None, "WAVE": None, "UBMAT": None, "HLIM": None, "SRANG": None} params = {"SPGR": None, "CELL": None, "WAVE": None, "UBMAT": None, "HLIM": None, "SRANG": None}
param_names = tuple(params) param_names = tuple(params)
for line in fileobj: for line in fileobj:
line = line.strip()
if "!" in line: # remove comments that start with ! sign if "!" in line: # remove comments that start with ! sign
line, _ = line.split(sep="!", maxsplit=1) line, _ = line.split(sep="!", maxsplit=1)
...@@ -177,7 +178,7 @@ def read_cfl_file(fileobj): ...@@ -177,7 +178,7 @@ def read_cfl_file(fileobj):
if line.startswith("UBMAT"): # next 3 lines contain the matrix if line.startswith("UBMAT"): # next 3 lines contain the matrix
param, val = "UBMAT", [] param, val = "UBMAT", []
for _ in range(3): for _ in range(3):
next_line = next(fileobj) next_line = next(fileobj).strip()
val.extend(next_line.split(maxsplit=2)) val.extend(next_line.split(maxsplit=2))
else: else:
param, val = line.split(maxsplit=1) param, val = line.split(maxsplit=1)
......
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