Skip to content

Commit 42187ac

Browse files
committed
dirname not used
1 parent 2b179b4 commit 42187ac

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

wfdb/_rdann.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ def rdann(recordname, annot, sampfrom=0, sampto=[], anndisp=1):
3232
"""
3333

3434
if sampto and sampto<=sampfrom:
35-
sys.exit("sampto must be greater than sampfrom")
35+
raise ValueError("sampto must be greater than sampfrom")
3636

3737
#fields=readheader(recordname) # Get the info from the header file
3838
dirname, baserecordname=os.path.split(recordname)
39-
40-
if dirname:
41-
dirname=dirname+"/"
4239

4340
f=open(recordname+'.'+annot, 'rb')
4441
filebytes=np.fromfile(f, '<u1').reshape([-1, 2]) # Read the file's byte pairs.

0 commit comments

Comments
 (0)