about summary refs log tree commit diff
path: root/pkgs/development/python-modules/biopython/close_parser_on_time.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/biopython/close_parser_on_time.patch')
-rw-r--r--pkgs/development/python-modules/biopython/close_parser_on_time.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/biopython/close_parser_on_time.patch b/pkgs/development/python-modules/biopython/close_parser_on_time.patch
new file mode 100644
index 0000000000000..05d22e22ed9e6
--- /dev/null
+++ b/pkgs/development/python-modules/biopython/close_parser_on_time.patch
@@ -0,0 +1,18 @@
+diff --git a/Bio/SeqIO/SeqXmlIO.py b/Bio/SeqIO/SeqXmlIO.py
+index 8fe75ebb728..6758317d05f 100644
+--- a/Bio/SeqIO/SeqXmlIO.py
++++ b/Bio/SeqIO/SeqXmlIO.py
+@@ -498,11 +498,12 @@ def iterate(self, handle):
+             if not text:
+                 break
+             parser.feed(text)
++        # Closing the parser ensures that all XML data fed into it are processed
++        parser.close()
+         # We have reached the end of the XML file;
+         # send out the remaining records
+         yield from records
+         records.clear()
+-        parser.close()
+ 
+ 
+ class SeqXmlWriter(SequenceWriter):