We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca94bda commit 4632df3Copy full SHA for 4632df3
xdist/remote.py
@@ -218,7 +218,15 @@ def serialize_warning_message(warning_message):
218
for attr_name in warning_message._WARNING_DETAILS:
219
if attr_name in ("message", "category"):
220
continue
221
- result[attr_name] = getattr(warning_message, attr_name)
+ attr = getattr(warning_message, attr_name)
222
+ # Check if we can serialize the warning detail, marking `None` otherwise
223
+ # Note that we need to define the attr (even as `None`) to allow deserializing
224
+ try:
225
+ dumps(attr)
226
+ except DumpError:
227
+ result[attr_name] = None
228
+ else:
229
+ result[attr_name] = attr
230
return result
231
232
0 commit comments