Skip to content

Commit c956c8d

Browse files
committed
fix: replace glob with file exists check
1 parent 78f03e9 commit c956c8d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

nipype/utils/filemanip.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,12 +723,10 @@ def loadpkl(infile):
723723
timeout = float(config.get("execution", "job_finished_timeout"))
724724
timed_out = True
725725
while (time() - t) < timeout:
726-
try:
727-
glob(str(infile)).pop()
726+
if infile.exists():
728727
timed_out = False
729728
break
730-
except Exception as e:
731-
fmlogger.debug(e)
729+
fmlogger.debug("'{}' missing; waiting 2s".format(infile))
732730
sleep(2)
733731
if timed_out:
734732
error_message = (

0 commit comments

Comments
 (0)