From: Lance McNearney Date: Mon, 25 Nov 2013 19:49:51 +0000 (-0800) Subject: Remove while loop since stream.get_token() will consume the whole keyword X-Git-Tag: v0.3.3~2^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f0612dea0c595c6fb82ec7f642391d205788872c;p=flanker.git Remove while loop since stream.get_token() will consume the whole keyword --- 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