1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00

netcmd: bugfix: json encoder failed to call super method

This lead to a strange recursion error when a field came up that the JSONEncoder couldn't encode.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
This commit is contained in:
Rob van der Linde
2024-02-08 20:53:01 +13:00
committed by Andrew Bartlett
parent ea63b058fc
commit 68092f85fa

View File

@ -50,4 +50,4 @@ class JSONEncoder(json.JSONEncoder):
return obj.as_sddl()
elif getattr(obj, "__json__", None) and callable(obj.__json__):
return obj.__json__()
return obj
return super().default(obj)