Skip to content

Commit

Permalink
Merge pull request #48 from zopefoundation/tseaver-47-python_msg_seta…
Browse files Browse the repository at this point in the history
…ttr_raise_attributeerror

fix: raise AttributeError from Python 'Message.__setattribute__'
  • Loading branch information
tseaver authored May 25, 2024
2 parents e22fd8a + b365d85 commit 735d4f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zope/i18nmessageid/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __setattr__(self, key, value):
It cannot be changed once the message id is created.
"""
if getattr(self, '_readonly', False):
raise TypeError('readonly attribute')
raise AttributeError('readonly attribute')
else:
return str.__setattr__(self, key, value)

Expand Down

0 comments on commit 735d4f8

Please sign in to comment.