Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cron/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,13 @@ def _send_media_via_adapter(
job.get("id", "?"), media_path, getattr(result, "error", "unknown"),
)
except Exception as e:
logger.warning("Job '%s': failed to send media %s: %s", job.get("id", "?"), media_path, e)
# Argument-less exceptions (notably TimeoutError, the most likely
# failure on this path) have an empty str(), which would render this
# warning with no reason at all. Fall back to the class name.
logger.warning(
"Job '%s': failed to send media %s: %s",
job.get("id", "?"), media_path, str(e) or type(e).__name__,
)


def _confirm_adapter_delivery(send_result) -> bool:
Expand Down