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.
diff --git a/test/py/TestFrozen.py b/test/py/TestFrozen.py
index ce7425f..f859398 100755
--- a/test/py/TestFrozen.py
+++ b/test/py/TestFrozen.py
@@ -21,7 +21,7 @@
 
 from DebugProtoTest import Srv
 from DebugProtoTest.ttypes import CompactProtoTestStruct, Empty, Wrapper
-from DebugProtoTest.ttypes import ExceptionWithAMap, MutableException
+from DebugProtoTest.ttypes import ExceptionWithAMap, MutableException, ExceptionWithoutFields
 from thrift.Thrift import TFrozenDict
 from thrift.transport import TTransport
 from thrift.protocol import TBinaryProtocol, TCompactProtocol
@@ -104,6 +104,9 @@
         mutexc.msg = 'bar'
         self.assertEqual(mutexc.msg, 'bar')
 
+    def test_frozen_exception_with_no_fields(self):
+        ExceptionWithoutFields()
+
     def test_frozen_exception_serialization(self):
         result = Srv.declaredExceptionMethod_result(
             xwamap=ExceptionWithAMap(blah="error"))