fix obscure, unlikely bug

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2010-08-11 23:16:32 -04:00
parent c76ce84e3f
commit 0f1a81d199
1 changed files with 2 additions and 2 deletions

4
tab.py
View File

@ -364,9 +364,9 @@ class StackTabber2(Tabber):
def _is_close_token(self, t):
return t.string in self.close_tokens.get(t.name, set())
def _handle_close_token(self, y, tokens, start, end, i, t):
if not self.stack:
raise Exception, "unmatched %r, line %d" % (t.string, y)
while True:
if not self.stack:
raise Exception, "unmatched %r, line %d" % (t.string, y)
marker = self.stack[-1]
if marker.name in ('control', 'continue'):
self.stack.pop()