summaryrefslogtreecommitdiff
path: root/src/lxml/serializer.pxi
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-08-31 20:40:32 +0200
committerStefan Behnel <stefan_ml@behnel.de>2017-08-31 20:40:32 +0200
commit900ca90e4efeb2f2ba04a76653a9dc133cc3886b (patch)
tree88fc8963087813033afa0d4c7a9cf78139500153 /src/lxml/serializer.pxi
parent604e12b0788fa014a0cd257fa696d1b352bb09a5 (diff)
downloadpython-lxml-900ca90e4efeb2f2ba04a76653a9dc133cc3886b.tar.gz
Evaluate error code inside of with-block to avoid "maybe uninitialised" C compiler warning.
Diffstat (limited to 'src/lxml/serializer.pxi')
-rw-r--r--src/lxml/serializer.pxi4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lxml/serializer.pxi b/src/lxml/serializer.pxi
index 5cc6c428..2970a59b 100644
--- a/src/lxml/serializer.pxi
+++ b/src/lxml/serializer.pxi
@@ -834,8 +834,8 @@ cdef _tofilelikeC14N(f, _Element element, bint exclusive, bint with_comments,
c_doc, NULL, exclusive, c_inclusive_ns_prefixes,
with_comments, c_buffer)
error = tree.xmlOutputBufferClose(c_buffer)
- if bytes_count < 0:
- error = bytes_count
+ if bytes_count < 0:
+ error = bytes_count
else:
raise TypeError(u"File or filename expected, got '%s'" %
python._fqtypename(f).decode('UTF-8'))