Skip to content

Commit 0c15cdc

Browse files
committed
fix dl_database bug when record has no data files.
1 parent 8ee9cd4 commit 0c15cdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wfdb/io/record.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all',
13911391
# Single segment record
13921392
if isinstance(record, Record):
13931393
# Add all dat files of the segment
1394-
for file in record.file_name:
1394+
for file in (record.file_name if record.file_name else []):
13951395
allfiles.append(posixpath.join(dirname, file))
13961396

13971397
# Multi segment record

0 commit comments

Comments
 (0)