From 48a14d8dd99e7d6d110b1988474cf0257020451c Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Fri, 27 Mar 2020 00:01:48 +0100 Subject: [PATCH] [FIX]xml-write macro needs ET (ElementTree) --- hy_odoo/odoo.hy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hy_odoo/odoo.hy b/hy_odoo/odoo.hy index 5085b3a..c6cc1a5 100644 --- a/hy_odoo/odoo.hy +++ b/hy_odoo/odoo.hy @@ -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")))