From: Oleg Broytman Date: Sat, 27 Aug 2016 13:41:32 +0000 (+0300) Subject: Fix Python3 compatibility X-Git-Tag: 0.0.1~19 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=7d3342fc8ae5d217736c9c055b53445c628da765;p=sqlconvert.git Fix Python3 compatibility --- 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"""