diff options
author | Neil Williams <neil@reddit.com> | 2021-02-16 15:12:15 -0800 |
---|---|---|
committer | Yuxuan 'fishy' Wang <fishywang@gmail.com> | 2021-02-16 16:31:00 -0800 |
commit | 055fe67ec1856d25f7ad3b98b5cd172fdf8e2c70 (patch) | |
tree | 062bf11a4e4dff23d87121e68022eb6e393699f7 /lib/py | |
parent | 526a1acf3b870d3b292423e19b9bb9bb0d18c0c3 (diff) | |
download | thrift-055fe67ec1856d25f7ad3b98b5cd172fdf8e2c70.tar.gz |
THRIFT-5352: Fix construction of Py exceptions with no fields
Client: py
When no fields are present, we don't get the special constructor that
uses __setattr__ to avoid these checks. So the default constructor sets
message normally and triggers the anti-mutation tripwires.
Diffstat (limited to 'lib/py')
-rw-r--r-- | lib/py/src/Thrift.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/py/src/Thrift.py b/lib/py/src/Thrift.py index ef655ea55..81fe8cf33 100644 --- a/lib/py/src/Thrift.py +++ b/lib/py/src/Thrift.py @@ -90,7 +90,7 @@ class TException(Exception): def __init__(self, message=None): Exception.__init__(self, message) - self.message = message + super(TException, self).__setattr__("message", message) class TApplicationException(TException): |