We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f77cac commit a5390f4Copy full SHA for a5390f4
1 file changed
signxml/processor.py
@@ -19,8 +19,8 @@
19
@lru_cache
20
def get_schema(schema_file: str) -> etree.XMLSchema:
21
pkg_name = "signxml.xades.schemas" if schema_file.startswith("XAdES") else "signxml.schemas"
22
- schema_fh = importlib.resources.open_text(pkg_name, schema_file)
23
- return etree.XMLSchema(etree.parse(schema_fh))
+ with importlib.resources.open_text(pkg_name, schema_file) as schema_fh:
+ return etree.XMLSchema(etree.parse(schema_fh))
24
25
26
class XMLProcessor:
0 commit comments