mirror of
https://github.com/codex-storage/deluge.git
synced 2025-03-03 20:40:50 +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
@ -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…
x
Reference in New Issue
Block a user