Author: gstein
Date: Thu Mar 11 22:42:40 2021
New Revision: 1887520

URL: http://svn.apache.org/viewvc?rev=1887520&view=rev
Log:
quick fix for whatif, when seats/names are specified

Modified:
    steve/trunk/whatif.py

Modified: steve/trunk/whatif.py
URL: 
http://svn.apache.org/viewvc/steve/trunk/whatif.py?rev=1887520&r1=1887519&r2=1887520&view=diff
==============================================================================
--- steve/trunk/whatif.py (original)
+++ steve/trunk/whatif.py Thu Mar 11 22:42:40 2021
@@ -78,7 +78,7 @@ if __name__ == '__main__':
     for name in sys.argv: names.remove(alias[name.lstrip('-').lower()])
   else:
     # only include specified candidates
-    names = map(lambda name: alias[name.lower()], set(sys.argv))
+    names = list(map(lambda name: alias[name.lower()], set(sys.argv)))
 
   # limit votes only to candidates
   for vote in votes.values():
@@ -86,7 +86,7 @@ if __name__ == '__main__':
       if names.count(vote[i]) == 0: vote.pop(i)
 
   # remove empty votes
-  for hashid in votes.keys():
+  for hashid in list(votes.keys()):
     if votes[hashid] == []: del votes[hashid]
 
   # run the vote


Reply via email to