From 07ef26a1a3b7e2b93d855970b92c985328eef097 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Fri, 25 Jan 2013 20:29:21 +0100 Subject: Fix a regression where reindent filter failed when comments contained non-ascii chars. --- sqlparse/filters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sqlparse') diff --git a/sqlparse/filters.py b/sqlparse/filters.py index 2f1c825..e238f69 100644 --- a/sqlparse/filters.py +++ b/sqlparse/filters.py @@ -288,8 +288,8 @@ class ReindentFilter: offset += 1 if (prev and isinstance(prev, sql.Comment) - and (str(prev).endswith('\n') - or str(prev).endswith('\r'))): + and (unicode(prev).endswith('\n') + or unicode(prev).endswith('\r'))): nl = tlist.token_next(token) else: nl = self.nl() -- cgit v1.2.1