From 7d3342fc8ae5d217736c9c055b53445c628da765 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 27 Aug 2016 16:41:32 +0300 Subject: [PATCH] Fix Python3 compatibility --- mysql2sql/process_tokens.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysql2sql/process_tokens.py b/mysql2sql/process_tokens.py index ddab2bf..7e32354 100644 --- a/mysql2sql/process_tokens.py +++ b/mysql2sql/process_tokens.py @@ -1,5 +1,6 @@ from sqlparse import parse +from sqlparse.compat import PY3 from sqlparse.tokens import Name, Error, Punctuation, Comment, Newline, \ Whitespace @@ -25,6 +26,10 @@ def find_error(token_list): return False +if PY3: + xrange = range + + class StatementGrouper(object): """Collect lines and reparse until the last statement is complete""" -- 2.39.5