mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-11-29 20:46:54 +01:00
hotfix: fix bug in append start read implementation
This commit is contained in:
parent
042d6af48d
commit
4f63bc4f4c
1 changed files with 3 additions and 2 deletions
|
|
@ -632,6 +632,7 @@ def _check_append_rep(content, start_list):
|
||||||
|
|
||||||
|
|
||||||
def _read_chunk_structure(chunk, pattern, b2b):
|
def _read_chunk_structure(chunk, pattern, b2b):
|
||||||
|
start_read = 0
|
||||||
for linenumber, line in enumerate(chunk):
|
for linenumber, line in enumerate(chunk):
|
||||||
if line.startswith("gauge_name"):
|
if line.startswith("gauge_name"):
|
||||||
gauge_line = linenumber
|
gauge_line = linenumber
|
||||||
|
|
@ -643,8 +644,8 @@ def _read_chunk_structure(chunk, pattern, b2b):
|
||||||
if re.search(pattern, found_pat):
|
if re.search(pattern, found_pat):
|
||||||
start_read = corr_line + 7 + b2b
|
start_read = corr_line + 7 + b2b
|
||||||
break
|
break
|
||||||
else:
|
if start_read == 0:
|
||||||
raise ValueError("Did not find pattern\n", pattern)
|
raise ValueError("Did not find pattern\n", pattern)
|
||||||
endline = corr_line + 6 + b2b
|
endline = corr_line + 6 + b2b
|
||||||
while not chunk[endline] == "\n":
|
while not chunk[endline] == "\n":
|
||||||
endline += 1
|
endline += 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue