about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-01-30 12:13:06 -0600
committerFrederick Muriuki Muriithi2026-01-30 12:13:06 -0600
commit3691df4c2bfdab29b61be53a6171ed0cb06bf5fc (patch)
tree516bea1227f8177f5204a2f946cc78fed33eeea9 /scripts
parent48de504c50ed1c78ec6bca9128aa283e65a0ea58 (diff)
downloadgn-uploader-3691df4c2bfdab29b61be53a6171ed0cb06bf5fc.tar.gz
Fix bug in reading file: Ensure to read all lines.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/phenotypes/delete_phenotypes.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/phenotypes/delete_phenotypes.py b/scripts/phenotypes/delete_phenotypes.py
index 028f061..e1396f3 100644
--- a/scripts/phenotypes/delete_phenotypes.py
+++ b/scripts/phenotypes/delete_phenotypes.py
@@ -26,10 +26,11 @@ def read_xref_ids_file(filepath: Optional[Path]) -> tuple[int, ...]:
 
     _ids: tuple[int, ...] = tuple()
     with filepath.open(mode="r") as infile:
-        try:
-            _ids += (int(infile.readline().strip()),)
-        except TypeError:
-            pass
+        for line in infile.readlines():
+            try:
+                _ids += (int(line.strip()),)
+            except TypeError:
+                pass
 
     return _ids