mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 18:08:39 +00:00
If plugin is installed on an older client, known_events
might not exist yet.
This commit is contained in:
parent
a5e8a9dc69
commit
127b577440
1 changed files with 6 additions and 1 deletions
|
@ -40,11 +40,16 @@
|
||||||
import smtplib
|
import smtplib
|
||||||
from twisted.internet import defer, threads
|
from twisted.internet import defer, threads
|
||||||
from deluge import component
|
from deluge import component
|
||||||
from deluge.event import known_events
|
|
||||||
from deluge.log import LOG as log
|
from deluge.log import LOG as log
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
|
||||||
|
try:
|
||||||
|
from deluge.event import known_events
|
||||||
|
except ImportError:
|
||||||
|
# Old deluge version
|
||||||
|
known_events = {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pygame
|
import pygame
|
||||||
SOUND_AVAILABLE = True
|
SOUND_AVAILABLE = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue