From 9fc18f0e41a4056b9734c74fe8c21d8f85029f62 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 19 Oct 2008 05:43:58 +0000 Subject: [PATCH] Fix the alert_type magic to work when libtorrent is not in the deluge module --- deluge/core/alertmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/alertmanager.py b/deluge/core/alertmanager.py index 91286b810..430a7c0a9 100644 --- a/deluge/core/alertmanager.py +++ b/deluge/core/alertmanager.py @@ -92,7 +92,7 @@ class AlertManager(component.Component): while alert is not None: # Loop through all alerts in the queue # Do some magic to get the alert type as a string - alert_type = str(type(alert)).split("'")[1].split(".")[2] + alert_type = str(type(alert)).split("'")[1].split(".")[-1] # Display the alert message log.debug("%s: %s", alert_type, alert.message()) # Call any handlers for this alert type