Skip to content

Commit 1d38c40

Browse files
committed
feat: provide a better error message for missing VCF
1 parent e341601 commit 1d38c40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/tp53/seshat/upload_vcf/_upload_vcf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
import time
34
from datetime import datetime
45
from datetime import timedelta
@@ -63,6 +64,9 @@ def upload_vcf(
6364
"""
6465
vcf = str(Path(vcf).expanduser().resolve().absolute())
6566

67+
if not os.path.exists(vcf):
68+
raise FileNotFoundError(f"Could not find VCF at path: {vcf}")
69+
6670
service = webdriver.ChromeService()
6771
options = webdriver.ChromeOptions()
6872
options.add_argument("headless")

0 commit comments

Comments
 (0)