]> khamidou — GitHub mirrors - flanker.git/commitdiff
Remove while loop since stream.get_token() will consume the whole keyword
authorLance McNearney <lance@mcnearney.net>
Mon, 25 Nov 2013 19:49:51 +0000 (11:49 -0800)
committerLance McNearney <lance@mcnearney.net>
Mon, 25 Nov 2013 19:49:51 +0000 (11:49 -0800)
flanker/addresslib/plugins/yahoo.py

index 1a0215dda994af2842a371a0c452ca351c889cb2..bd59b0be4197ce9d1b17ac8929672305ce2d3a8e 100644 (file)
@@ -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