We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe8facf commit 1099dd6Copy full SHA for 1099dd6
1 file changed
elementary/messages/messaging_integrations/file_system.py
@@ -1,3 +1,4 @@
1
+import json
2
from datetime import datetime
3
from pathlib import Path
4
@@ -54,7 +55,8 @@ def send_message(
54
55
file_path = channel_dir / filename
56
57
try:
- file_path.write_text(body.json(), encoding="utf-8")
58
+ json_str = json.dumps(body.dict(), indent=2)
59
+ file_path.write_text(json_str, encoding="utf-8")
60
except Exception as exc:
61
logger.error(
62
f"Failed to write alert message to file {file_path}: {exc}",
0 commit comments