Skip to content

Commit

Permalink
Return nothing when Remind returns a Parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
jspricke committed Apr 19, 2024
1 parent 0ba3f2c commit 77f6ce4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions remind.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def _parse_remind(self, filename: str, lines: str = "") -> dict[str, dict[str, A
if f"Can't open file: {filename}" in process.stderr:
return {filename: {}}

if "): Parse error" in process.stderr:
return {filename: {}}

err = list(set(findall(r"Can't open file: (.*)", process.stderr)))
if err:
raise FileNotFoundError(f'include file(s): {", ".join(err)} not found (please use absolute paths)')
Expand Down

0 comments on commit 77f6ce4

Please sign in to comment.