X-Git-Url: https://git.phdru.name/?p=sqlconvert.git;a=blobdiff_plain;f=scripts%2Fgroup-file.py;h=5ab1f447ea2f48bf61c5dae14db4ccc8a29f4675;hp=92f8fb9100d8839d7f0150e899db8c5886d231d8;hb=0f209248832190291a510febd790e71a815e496a;hpb=96d6304e4c08ef94bb7dfac3e3069fcb8c982747 diff --git a/scripts/group-file.py b/scripts/group-file.py index 92f8fb9..5ab1f44 100755 --- a/scripts/group-file.py +++ b/scripts/group-file.py @@ -23,9 +23,10 @@ def main(filename): statement._pprint_tree() print("----------") tokens = grouper.close() - for token in tokens: - print_tokens(token) - print(repr(token)) + if tokens: + for token in tokens: + print_tokens(token) + print(repr(token)) if __name__ == '__main__':