mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 20:14:51 +00:00
Change how the alert name is found to use the class's __name__ property
This commit is contained in:
parent
4471d70d6c
commit
f97273e094
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue