Fix _flatten_up_to_token() to be PEP 479 compatible
Fix _flatten_up_to_token() to be PEP 479 compatible

Fixes warning during tests:

PendingDeprecationWarning: generator 'ReindentFilter._flatten_up_to_token' raised StopIteration

PEP 479 documentation: https://www.python.org/dev/peps/pep-0479/

andialbrecht/sqlparse