Changes.
[kiosk.git] / grab_bag.py
index 807f74f6384e5cde38e3fc16db438004ca69d979..10272da7acb37a64f4a281377af677a5f7b1807e 100644 (file)
@@ -1,10 +1,13 @@
 #!/usr/bin/env python3
 
-from collections import Counter
+import logging
 import random
 from typing import Iterable, List, Optional, Set
 
 
+logger = logging.getLogger(__name__)
+
+
 class grab_bag(object):
     def __init__(self) -> None:
         self.contents: Set[str] = set()
@@ -23,7 +26,7 @@ class grab_bag(object):
     def subset(self, count: int) -> Optional[List[str]]:
         if len(self.contents) < count:
             return None
-        return random.sample(self.contents, count)
+        return random.sample(list(self.contents), count)
 
     def size(self) -> int:
         return len(self.contents)