MCPcopy Create free account
hub / github.com/PyTables/PyTables / _check_writable

Method _check_writable

tables/file.py:2337–2344  ·  view source on GitHub ↗

Check whether the file is writable. If the file is not writable, a `FileModeError` is raised.

(self)

Source from the content-addressed store, hash-verified

2335 return self.mode in ("w", "a", "r+")
2336
2337 def _check_writable(self) -> None:
2338 """Check whether the file is writable.
2339
2340 If the file is not writable, a `FileModeError` is raised.
2341
2342 """
2343 if not self._iswritable():
2344 raise FileModeError("the file is not writable")
2345
2346 def _check_group(self, node: Group) -> None:
2347 # `node` must already be a node.

Callers 15

enable_undoMethod · 0.95
disable_undoMethod · 0.95
markMethod · 0.95
undoMethod · 0.95
redoMethod · 0.95
flavorMethod · 0.80
__init__Method · 0.80
_f_removeMethod · 0.80
_f_moveMethod · 0.80
appendMethod · 0.80
__setitem__Method · 0.80
appendMethod · 0.80

Calls 2

_iswritableMethod · 0.95
FileModeErrorClass · 0.85

Tested by

no test coverage detected