From f97273e094c17089102b8ce4e81f1453fb08f50f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 31 Dec 2008 02:47:17 +0000 Subject: [PATCH] Change how the alert name is found to use the class's __name__ property --- deluge/core/alertmanager.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deluge/core/alertmanager.py b/deluge/core/alertmanager.py index ef0d1b504..f9b1bc07f 100644 --- a/deluge/core/alertmanager.py +++ b/deluge/core/alertmanager.py @@ -90,8 +90,7 @@ class AlertManager(component.Component): alert = self.session.pop_alert() 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(".")[-1] + alert_type = type(alert).__name__ # Display the alert message log.debug("%s: %s", alert_type, alert.message()) # Call any handlers for this alert type