comparison genshi/template/markup.py @ 1012:cdb5d435d237 trunk

Fix assert with side-effect in xi:fallback directive processing (see #565).
author hodgestar
date Mon, 17 Jun 2013 20:52:21 +0000
parents d1edb246cc61
children 5dccab13ec85
comparison
equal deleted inserted replaced
1011:d13802b8c7cc 1012:cdb5d435d237
228 else: 228 else:
229 stream.append((kind, (tag, attrs), pos)) 229 stream.append((kind, (tag, attrs), pos))
230 230
231 elif kind is END: 231 elif kind is END:
232 if fallbacks and data == xinclude_ns['fallback']: 232 if fallbacks and data == xinclude_ns['fallback']:
233 assert streams.pop() is fallbacks[-1] 233 fallback_stream = streams.pop()
234 assert fallback_stream is fallbacks[-1]
234 elif data == xinclude_ns['include']: 235 elif data == xinclude_ns['include']:
235 fallback = None 236 fallback = None
236 if len(fallbacks) == len(includes): 237 if len(fallbacks) == len(includes):
237 fallback = fallbacks.pop() 238 fallback = fallbacks.pop()
238 streams.pop() # discard anything between the include tags 239 streams.pop() # discard anything between the include tags
Copyright (C) 2012-2017 Edgewall Software