sp_fr: pass only file descriptors to ET.parse() (#52876)
This commit is contained in:
parent
fbac97e92e
commit
0f21ea0645
|
@ -551,7 +551,9 @@ class Mapping(models.Model):
|
|||
|
||||
@property
|
||||
def xsd(self):
|
||||
doc = ET.parse(os.path.join(os.path.dirname(__file__), '%s.XSD' % self.procedure))
|
||||
path = os.path.join(os.path.dirname(__file__), '%s.XSD' % self.procedure)
|
||||
with open(path, 'rb') as fd:
|
||||
doc = ET.parse(fd)
|
||||
schema = Schema()
|
||||
schema.visit(doc.getroot())
|
||||
return schema
|
||||
|
|
Loading…
Reference in New Issue