Skip to content

Commit

Permalink
BUGFIX: cnames were cached incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsalo committed Apr 11, 2010
1 parent 9f808d3 commit 89dafc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions streamxmlwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _cname(self, name, nsmap, cnames):
cname = prefix + ":" + ncname
else:
cname = ncname
cnames[name] = cname
cnames[name] = cname, (uri, ncname)
return cname, (uri, ncname)

def start(self, tag, attributes=None, nsmap=None, **kwargs):
Expand Down Expand Up @@ -256,7 +256,7 @@ def end(self, tag=None):
"""
open_tag, namespaces, cnames = self._tags.pop()
if tag is not None:
tag , _= self._cname(tag, namespaces, cnames)
tag, _ = self._cname(tag, namespaces, cnames)
if open_tag != tag:
raise XMLSyntaxError("Start and end tag mismatch: %s and /%s."
% (open_tag, tag))
Expand Down

0 comments on commit 89dafc4

Please sign in to comment.