about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-01-30 12:28:56 -0600
committerFrederick Muriuki Muriithi2026-01-30 12:28:56 -0600
commitb627bd70df9c634be276e7db1aa6a038d7ccf1bc (patch)
tree84d9b34215f1a58264c23598bc02fbc8461146b8 /scripts
parentb75aa8b8da8a0dd145e95705e495a0ab37917396 (diff)
downloadgn-uploader-b627bd70df9c634be276e7db1aa6a038d7ccf1bc.tar.gz
Delete temporary file after completing deletion.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/phenotypes/delete_phenotypes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/phenotypes/delete_phenotypes.py b/scripts/phenotypes/delete_phenotypes.py
index 1403216..692dc59 100644
--- a/scripts/phenotypes/delete_phenotypes.py
+++ b/scripts/phenotypes/delete_phenotypes.py
@@ -144,6 +144,11 @@ if __name__ == "__main__":
                 print("Deleting the data: ", end="")
                 delete_phenotypes(cursor, args.population_id, xref_ids=xref_ids)
                 print("OK.")
+                if args.xref_ids_file is not None:
+                    print("Deleting temporary file: ", end="")
+                    args.xref_ids_file.unlink()
+                    print("OK.")
+
                 return 0
             except AssertionError:
                 logger.error(