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

Prevent writing to things that shouldn't be written to #8

Open
Helveg opened this issue Feb 4, 2021 · 0 comments
Open

Prevent writing to things that shouldn't be written to #8

Helveg opened this issue Feb 4, 2021 · 0 comments

Comments

@Helveg
Copy link
Owner

Helveg commented Feb 4, 2021

Add a list of things that shouldn't be written to and patch up all the ways to access them, like the __getitem__ function. Goal is this:

with bwpy.File(...) as f:
  f["3BRecInfo/3BRecVars/BitDepth"][0] = 12
>>> RuntimeError: The bit depth is a protected variable. If you wish to venture into dangerous lands open the file in unsafe mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant