Skip to content

Commit 313c7b0

Browse files
committed
Fixed issue 67: removed side-effects from assert statements
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401155
1 parent 56c7e58 commit 313c7b0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/html5lib/html5parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,12 @@ def parseRCDataCData(self, name, attributes, contentType):
260260
else:
261261
assert self.tokenizer.contentModelFlag == contentModelFlags["PCDATA"]
262262
assert token["type"] == "EndTag" and token["name"] == name, repr(token)
263-
assert self.tree.openElements.pop() == element
263+
popped = self.tree.openElements.pop()
264+
assert popped == element
264265
return
265266
#Otherwise we hit EOF
266-
assert self.tree.openElements.pop() == element
267+
popped = self.tree.openElements.pop()
268+
assert popped == element
267269
self.parseError("expected-closing-tag-but-got-eof")
268270

269271
class Phase(object):

0 commit comments

Comments
 (0)