summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2013-01-25 20:29:21 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2013-01-25 20:29:21 +0100
commit07ef26a1a3b7e2b93d855970b92c985328eef097 (patch)
treecfd761d28191aa993668a40038e033c2259df9fa /sqlparse
parent1584b2225a8d81366ab0298d21b341969c603e8d (diff)
downloadsqlparse-07ef26a1a3b7e2b93d855970b92c985328eef097.tar.gz
Fix a regression where reindent filter failed when comments contained non-ascii chars.
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/filters.py4
1 files changed, 2 insertions, 2 deletions
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()