Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed lockfile check when using a Docker read-only filesystem #3832

Merged
merged 6 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ Chronological list of authors
- Raymond Zhao
- Haleema Khan
- Jennifer A Clark
- Jake Fennick


External code
Expand Down
2 changes: 1 addition & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The rules for this file:

------------------------------------------------------------------------------
??/??/?? IAlibay, Luthaf, hmacdope, rafaelpap, jbarnoud, BFedder, aya9aladdin,
jaclark5
jaclark5, jfennick

* 2.4.0

Expand Down
13 changes: 8 additions & 5 deletions package/MDAnalysis/coordinates/XDR.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,14 @@ def _load_offsets(self):
try:
with fasteners.InterProcessLock(lock_name) as filelock:
pass
except PermissionError:
warnings.warn(f"Cannot write lock/offset file in same location as "
"{self.filename}. Using slow offset calculation.")
self._read_offsets(store=True)
return
except OSError as e:
if isinstance(e, PermissionError) or e.errno == errno.EROFS:
warnings.warn(f"Cannot write lock/offset file in same location as "
"{self.filename}. Using slow offset calculation.")
self._read_offsets(store=True)
return
jfennick marked this conversation as resolved.
Show resolved Hide resolved
else:
raise

with fasteners.InterProcessLock(lock_name) as filelock:
if not isfile(fname):
Expand Down