[FIX]xml-write macro needs ET (ElementTree)

This commit is contained in:
Fabien BOURGEOIS 2020-03-27 00:01:48 +01:00
parent 2d520c2d8a
commit 48a14d8dd9
1 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,8 @@
(defmacro/g! xml-write [filename tree]
"Write XML file according to filename and given tree"
`(do
(import [os [path]])
(import [os [path]]
[xml.etree.ElementTree :as ET])
(if-python2
(setv ~g!output-xml (.tostring ET ~tree))
(setv ~g!output-xml (.decode (.tostring ET ~tree) "utf-8")))