Skip to content

Commit

Permalink
fixing python parser for proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Sep 12, 2024
1 parent 0f8344f commit 7e10563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/py_client/democracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def parse_proposals(text):
proposal = "Proposal id:" + proposal # Add back the identifier
lines = proposal.split("\n")
id = int(re.search(r'\d+', lines[0]).group())
action = re.search(r'action:\w+\([\w, .]+\)', lines[1]).group()
action = re.search(r'action:\s*"?([^"]+)"?', lines[1]).group()
started = datetime.strptime(re.search(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', lines[2]).group(),
'%Y-%m-%d %H:%M:%S')
ends = datetime.strptime(re.search(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', lines[3]).group(),
Expand Down

0 comments on commit 7e10563

Please sign in to comment.