Skip to content

Commit

Permalink
AK: further vote fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturk committed Feb 10, 2012
1 parent ce0911a commit 8cd1830
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openstates/ak/bills.py
Expand Up @@ -210,8 +210,8 @@ def parse_vote(self, bill, action, act_chamber, act_date, url):
vote = Vote(act_chamber, act_date, motion, yes > no, yes, no, other)

vote_lines = doc.xpath('//b[contains(text(), "YEAS:")]')[0].tail.split('\r\n')
vote_type = None
for vote_list in vote_lines:
vote_type = False
if vote_list.startswith('Yeas: '):
vote_list, vote_type = vote_list[6:], vote.yes
elif vote_list.startswith('Nays: '):
Expand All @@ -220,6 +220,8 @@ def parse_vote(self, bill, action, act_chamber, act_date, url):
vote_list, vote_type = vote_list[9:], vote.other
elif vote_list.startswith('Absent: '):
vote_list, vote_type = vote_list[9:], vote.other
elif vote_list.strip() == '':
vote_type = None
if vote_type:
for name in vote_list.split(','):
name = name.strip()
Expand Down

0 comments on commit 8cd1830

Please sign in to comment.