Skip to content

Commit

Permalink
Update validators.py
Browse files Browse the repository at this point in the history
Force change to not check read write privs

Signed-off-by: Nicholas Cilfone <23509131+ncilfone@users.noreply.github.com>
  • Loading branch information
ncilfone committed Oct 24, 2023
1 parent 65831bf commit 9d20f30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spock/backend/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def __call__(self, inst: _C, attr: attr.Attribute, value: Any) -> None:
and self.type[0].__name__ == "directory"
):
return _is_directory(
self.type, create=True, check_access=True, attr=attr, value=value
self.type, create=True, check_access=False, attr=attr, value=value
)
# Catch the file type -- tuples suck, so we need to handle them with their own
# condition here -- basically if the tuple is of type directory then we need
Expand All @@ -271,7 +271,7 @@ def __call__(self, inst: _C, attr: attr.Attribute, value: Any) -> None:
and hasattr(self.type[0], "__name__")
and self.type[0].__name__ == "file"
):
return _is_file(type=self.type, check_access=True, attr=attr, value=value)
return _is_file(type=self.type, check_access=False, attr=attr, value=value)
# Fallback on base attr
else:
return _check_instance(value=value, name=attr.name, type=self.type)
Expand Down

0 comments on commit 9d20f30

Please sign in to comment.