mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-15 22:14:24 +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
@ -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…
x
Reference in New Issue
Block a user