Skip to content

Commit

Permalink
fix: xml.dom.minidom issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Guigui14460 committed Jun 2, 2022
1 parent c950adb commit cd45199
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project_automation/files/xml_file.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import NoReturn
import xml.dom.minidom
import defusedxml.minidom
import xml.etree.ElementTree as ET

from project_automation.files import CustomFileExtension
Expand Down Expand Up @@ -87,7 +87,7 @@ def prettify(cls, elem: ET.Element, doctype: str = None) -> str:
the all root in string format
"""
data = ET.tostring(elem, **cls.CONFIG['xml_tostring'])
dom = xml.dom.minidom.parseString(data)
dom = defusedxml.minidom.parseString(data)
string = dom.toprettyxml(cls.CONFIG['indentation'])
if doctype is not None:
lines = string.split("\n")
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ altgraph==0.17
autopep8==1.5.3
certifi==2022.5.18.1
chardet==3.0.4
charset-normalizer==2.0.12
defusedxml==0.7.1
Deprecated==1.2.10
future==0.18.2
idna==3.3
Expand Down

0 comments on commit cd45199

Please sign in to comment.