Skip to content

Commit

Permalink
Update src/RestrictedPython/Guards.py
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac authored Aug 7, 2024
1 parent 98c6497 commit 5454bfa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/RestrictedPython/Guards.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ def safer_getattr(object, name, default=None, getattr=getattr):
if name in INSPECT_ATTRIBUTES:
raise AttributeError(
f'"{name}" is a restricted name,'
' that is forbidden to access in RestrictedPython.',
)
' that is forbidden to access in RestrictedPython.')
if name.startswith('_'):
raise AttributeError(
'"{name}" is an invalid attribute name because it '
Expand Down

0 comments on commit 5454bfa

Please sign in to comment.