diff --git a/update-firewall-source.py b/update-firewall-source.py index dc89c60..0be4fbe 100644 --- a/update-firewall-source.py +++ b/update-firewall-source.py @@ -477,10 +477,8 @@ def write_new_fwd_direct_xml( config_obj: configparser.ConfigParser()) -> bool: global arg_fw_rule_data - fwd_direct_xml_str = lxml.etree.tostring(arg_fw_rule_data, - pretty_print=True, - encoding="UTF-8", - xml_declaration=True).decode() + fwd_direct_xml_str = get_xml_str_repr() + try: with open(config_obj.get(configparser.DEFAULTSECT, "firewalld_direct_abs"), "r+") as fwd_file_handle: log.info(f"Writing new firewalld direct config ...")