From f0612dea0c595c6fb82ec7f642391d205788872c Mon Sep 17 00:00:00 2001 From: Lance McNearney Date: Mon, 25 Nov 2013 11:49:51 -0800 Subject: [PATCH] Remove while loop since stream.get_token() will consume the whole keyword --- flanker/addresslib/plugins/yahoo.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/flanker/addresslib/plugins/yahoo.py b/flanker/addresslib/plugins/yahoo.py index 1a0215d..bd59b0b 100644 --- a/flanker/addresslib/plugins/yahoo.py +++ b/flanker/addresslib/plugins/yahoo.py @@ -160,14 +160,9 @@ def _validate_disposable(localpart): if hyphen is None: return False - while True: - # alpha, num - keyword = stream.get_token(ALPHANUM) - - if keyword is None: - break + # keyword must be alpha, num + stream.get_token(ALPHANUM) - # alpha or numeric must be end of stream if not stream.end_of_stream(): return False -- 2.43.0