Skip to content

Commit f197124

Browse files
authored
Cast libtorrent alert to str before logging (#8677)
2 parents 5a789de + b59d677 commit f197124

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tribler/core/libtorrent/download_manager/download_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,9 @@ def process_alert(self, alert: lt.alert, hops: int = 0) -> None: # noqa: C901,
451451
if is_process_alert:
452452
download.process_alert(cast("lt.torrent_alert", alert), alert_type)
453453
else:
454-
logger.debug("Got alert for download without handle %s: %s", infohash, alert)
454+
logger.debug("Got alert for download without handle %s: %s", infohash, str(alert))
455455
elif infohash:
456-
logger.debug("Got alert for unknown download %s: %s", infohash, alert)
456+
logger.debug("Got alert for unknown download %s: %s", infohash, str(alert))
457457
if alert_type == "add_torrent_alert":
458458
# A torrent got added, but the download is already removed.
459459
handle = cast("lt.add_torrent_alert", alert).handle

0 commit comments

Comments
 (0)