Skip to content

Commit abda367

Browse files
committed
fix trailing semicolon error
1 parent 9cf45eb commit abda367

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sqlparse/filters/aligned_indent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def nl(self, offset=1):
3838
self._max_kwd_len + offset + indent + self.offset))
3939

4040
def _process_statement(self, tlist):
41-
if tlist.tokens[0].is_whitespace and self.indent == 0:
41+
if len(tlist.tokens) > 0 and tlist.tokens[0].is_whitespace \
42+
and self.indent == 0:
4243
tlist.tokens.pop(0)
4344

4445
# process the main query body

0 commit comments

Comments
 (0)