security-update
Andrew Port 2021-09-23 02:18:32 -07:00
parent 0c5dc9de1a
commit 2368627a17
1 changed files with 8 additions and 1 deletions

View File

@ -36,9 +36,15 @@ A Big Problem:
# External dependencies # External dependencies
from __future__ import division, absolute_import, print_function from __future__ import division, absolute_import, print_function
import os import os
import pdb
import sys
import collections import collections
from defusedxml.cElementTree import parse, tostring from defusedxml.cElementTree import parse, tostring
from xml.etree.cElementTree import Element, SubElement, register_namespace, ElementTree from xml.etree.cElementTree import register_namespace
if sys.version_info.major == 2:
from xml.etree.ElementTree import Element, SubElement, ElementTree
else:
from xml.etree.cElementTree import Element, SubElement, ElementTree
from defusedxml.minidom import parseString from defusedxml.minidom import parseString
import warnings import warnings
from tempfile import gettempdir from tempfile import gettempdir
@ -98,6 +104,7 @@ def flattened_paths(group, group_filter=lambda x: True,
`path_conversions=CONVERT_ONLY_PATHS`. `path_conversions=CONVERT_ONLY_PATHS`.
""" """
if not isinstance(group, Element): if not isinstance(group, Element):
pdb.set_trace()
raise TypeError('Must provide an xml.etree.Element object. ' raise TypeError('Must provide an xml.etree.Element object. '
'Instead you provided {0}'.format(type(group))) 'Instead you provided {0}'.format(type(group)))