SafeLockedFileForRead

lsst.daf.butler.core.safeFileIo.SafeLockedFileForRead(name)

Context manager for reading a file that may be locked with an exclusive lock via SafeLockedFileForWrite.

This will first acquire a shared lock before returning the file. When the file is closed the shared lock will be unlocked.

Parameters
namestring

The file name to be opened, may include path.

Yields
file object

The file to be read from.