Skip to content

Commit

Permalink
Update XDR.py
Browse files Browse the repository at this point in the history
returned the warning and read_offsets for tests
  • Loading branch information
talagayev authored Nov 23, 2024
1 parent f8f05f2 commit 3cd7307
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package/MDAnalysis/coordinates/XDR.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def _load_offsets(self):
pass
except OSError as e:
if isinstance(e, PermissionError) or e.errno == errno.EROFS:
self._read_offsets(store=False)
warnings.warn(f"Cannot write lock/offset file in same location as "
f"{self.filename}. Using slow offset calculation.")
self._read_offsets(store=True)
return
else:
raise
Expand Down

0 comments on commit 3cd7307

Please sign in to comment.