From 996d35ec06852883886673cafe0c0c2e0d0c09b8 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 3 Jan 2021 15:41:36 -0800 Subject: [PATCH] more whitepace handling --- the_draft.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/the_draft.py b/the_draft.py index aa50892..bab2b05 100644 --- a/the_draft.py +++ b/the_draft.py @@ -88,11 +88,13 @@ class Draft: if self._active_participant.handle != handle: raise ValueError('Invalid drafter') + player_name = player_name.strip() + player = self._players.get(player_name) if not player: # might be some whitespace shenanigans for name, stats in self._players.items(): - if name.replace('\xa0', ' ') == player_name: + if name.replace('\xa0', ' ').strip() == player_name: player = stats break else: