steve-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Smith (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (STEVE-52) [PATCH] stv.run_vote() returns unusable values in edge cases
Date Wed, 21 Mar 2018 14:10:00 GMT

     [ https://issues.apache.org/jira/browse/STEVE-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brett Smith updated STEVE-52:
-----------------------------
    Description: 
stv.run_vote() returns None in cases where there's basically nothing to run, because all of
the candidates are obviously either elected or eliminated. Callers expect it to always return
a list of winners, and so they tend to crash when they get the non-iterable None instead.

Attached is a patch to tweak the logic flow to make sure it always returns a list of winners,
even in the obvious cases.

> [PATCH] stv.run_vote() returns unusable values in edge cases
> ------------------------------------------------------------
>
>                 Key: STEVE-52
>                 URL: https://issues.apache.org/jira/browse/STEVE-52
>             Project: Steve
>          Issue Type: Bug
>            Reporter: Brett Smith
>            Priority: Major
>         Attachments: stv-returnvalue.patch
>
>
> stv.run_vote() returns None in cases where there's basically nothing to run, because
all of the candidates are obviously either elected or eliminated. Callers expect it to always
return a list of winners, and so they tend to crash when they get the non-iterable None instead.
> Attached is a patch to tweak the logic flow to make sure it always returns a list of
winners, even in the obvious cases.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message