Skip to content

Commit

Permalink
Handle invalid __getattribute__ functions
Browse files Browse the repository at this point in the history
Addresses #1832
  • Loading branch information
rchiodo authored Feb 12, 2025
1 parent fb0b06c commit f7f754d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def __init__(self, cmd_id, seq, text, is_json=False):
as_dict["pydevd_cmd_id"] = cmd_id
as_dict["seq"] = seq
self.as_dict = as_dict
text = json.dumps(as_dict)
try:
text = json.dumps(as_dict)
except TypeError:
text = json.dumps(as_dict, default=lambda o: str(o))

assert isinstance(text, str)

Expand Down

0 comments on commit f7f754d

Please sign in to comment.