mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-26 19:32:21 +00:00
show easy to understand error message on twisted importerror for the not so bright #796
This commit is contained in:
parent
06bb660a10
commit
ee05e18a9a
@ -30,9 +30,14 @@ import threading
|
||||
import pkg_resources
|
||||
import base64
|
||||
|
||||
from twisted.internet import reactor
|
||||
from twisted.internet.task import LoopingCall
|
||||
import twisted.web.client
|
||||
from deluge.log import LOG as log
|
||||
|
||||
try:
|
||||
from twisted.internet import reactor
|
||||
from twisted.internet.task import LoopingCall
|
||||
import twisted.web.client
|
||||
except ImportError:
|
||||
log.error("You must install python-twisted")
|
||||
|
||||
try:
|
||||
import deluge.libtorrent as lt
|
||||
@ -54,8 +59,6 @@ from deluge.core.autoadd import AutoAdd
|
||||
from deluge.core.authmanager import AuthManager
|
||||
from deluge.core.rpcserver import export
|
||||
|
||||
from deluge.log import LOG as log
|
||||
|
||||
STATUS_KEYS = ['active_time', 'compact', 'distributed_copies', 'download_payload_rate', 'eta',
|
||||
'file_priorities', 'file_progress', 'files', 'hash', 'is_auto_managed', 'is_seed', 'max_connections',
|
||||
'max_download_speed', 'max_upload_slots', 'max_upload_speed', 'message', 'move_on_completed',
|
||||
|
@ -26,8 +26,11 @@
|
||||
from deluge.log import LOG as log
|
||||
|
||||
# Install the twisted reactor
|
||||
from twisted.internet import gtk2reactor
|
||||
reactor = gtk2reactor.install()
|
||||
try:
|
||||
from twisted.internet import gtk2reactor
|
||||
reactor = gtk2reactor.install()
|
||||
except ImportError:
|
||||
log.error("You must install python-twisted")
|
||||
|
||||
import gobject
|
||||
import gettext
|
||||
|
Loading…
x
Reference in New Issue
Block a user