unsafe -> not safe

This commit is contained in:
Dave Halter committed 2021-01-03 01:13:17 +01:00
1 parent 3428a24af0
commit e6f18df1d2
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -306,9 +306,9 @@ class DirectObjectAccess:
except TypeError:
return False
def is_allowed_getattr(self, name, unsafe=False):
def is_allowed_getattr(self, name, safe=True):
# TODO this API is ugly.
if unsafe:
if not safe:
# Unsafe is mostly used to check for __getattr__/__getattribute__.
# getattr_static works for properties, but the underscore methods
# are just ignored (because it's safer and avoids more code