Skip to content

Commit 5e30af4

Browse files
committed
search for local config
1 parent 6db6a61 commit 5e30af4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wfdb/_rdsamp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -855,11 +855,11 @@ def loadconfig(fn):
855855
"""
856856
config = ConfigParser()
857857
for loc in [os.curdir,os.path.expanduser("~"),os.path.dirname(__file__)]:
858-
try:
859-
with open(os.path.join(loc,fn)) as source:
858+
configfn = os.path.join(loc,fn)
859+
if os.path.isfile(configfn):
860+
with open(configfn) as source:
860861
config.readfp(source)
861-
except IOError:
862-
pass
862+
break
863863
return config
864864

865865

0 commit comments

Comments
 (0)