Skip to content

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

@Helveg

Description

@Helveg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions