summaryrefslogtreecommitdiffstats
path: root/deluge/core/alertmanager.py
diff options
context:
space:
mode:
authorLibravatarDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 16:05:49 +0100
committerLibravatarDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 16:05:49 +0100
commitd395bd510fa4f4376dc5237ab2f8d190a920d35d (patch)
tree3e3b16b44064938be801aede14381562bae14f6a /deluge/core/alertmanager.py
parentd1772d410235592b482e3b08b1863f6624d9fe6b (diff)
Adding upstream version 2.1.1.upstream/2.1.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/core/alertmanager.py')
-rw-r--r--deluge/core/alertmanager.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/deluge/core/alertmanager.py b/deluge/core/alertmanager.py
index 2fe4222..9a1ded5 100644
--- a/deluge/core/alertmanager.py
+++ b/deluge/core/alertmanager.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
@@ -15,10 +14,8 @@ This should typically only be used by the Core. Plugins should utilize the
`:mod:EventManager` for similar functionality.
"""
-from __future__ import unicode_literals
-
import logging
-import types
+from types import SimpleNamespace
from twisted.internet import reactor
@@ -28,14 +25,6 @@ from deluge.common import decode_bytes
log = logging.getLogger(__name__)
-try:
- SimpleNamespace = types.SimpleNamespace # Python 3.3+
-except AttributeError:
-
- class SimpleNamespace(object): # Python 2.7
- def __init__(self, **attr):
- self.__dict__.update(attr)
-
class AlertManager(component.Component):
"""AlertManager fetches and processes libtorrent alerts"""
@@ -57,6 +46,7 @@ class AlertManager(component.Component):
| lt.alert.category_t.status_notification
| lt.alert.category_t.ip_block_notification
| lt.alert.category_t.performance_warning
+ | lt.alert.category_t.file_progress_notification
)
self.session.apply_settings({'alert_mask': alert_mask})