Skip to content

Commit

Permalink
ignore lines that cannot be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
ulasozguler committed Feb 7, 2024
1 parent 67c5184 commit 0c4a0d1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/notes_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ def _parse_changelist(content):
items = []
for line in content.split("\n"):
line = line[2:]
pr_title, line = line.split(" by @", 1)
author, pr_link = line.split(" in ", 1)
items.append(
{
"title": pr_title,
"author": author,
"link": pr_link,
}
)
try:
pr_title, line = line.split(" by @", 1)
author, pr_link = line.split(" in ", 1)
items.append(
{
"title": pr_title,
"author": author,
"link": pr_link,
}
)
except Exception as ex:
print('skipped', line, ex)
return items


Expand Down

0 comments on commit 0c4a0d1

Please sign in to comment.