X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mysql2sql%2Fprint_tokens.py;h=5d104c37d0d159e0f4f8e0fdeacc97dcd1523c82;hb=28b15069b60bba71d6b3b8a038353039aaf9b2d6;hp=0f03d0357f151bc3af02380e9be94bebae0d98a9;hpb=3b998d3e75a5058385746f78216d234b592333a5;p=sqlconvert.git diff --git a/mysql2sql/print_tokens.py b/mysql2sql/print_tokens.py index 0f03d03..5d104c3 100644 --- a/mysql2sql/print_tokens.py +++ b/mysql2sql/print_tokens.py @@ -12,10 +12,10 @@ from sqlparse.sql import TokenList def print_tokens(token_list, outfile=sys.stdout, level=0): for token in token_list: - if not isinstance(token, TokenList): - outfile.write(token.normalized) if isinstance(token, TokenList): print_tokens(token, outfile, level+1) + else: + outfile.write(token.normalized) def get_tokens_str(token_list):