mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-27 11:45:44 +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 pkg_resources
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
from twisted.internet import reactor
|
from deluge.log import LOG as log
|
||||||
from twisted.internet.task import LoopingCall
|
|
||||||
import twisted.web.client
|
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:
|
try:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
@ -54,8 +59,6 @@ from deluge.core.autoadd import AutoAdd
|
|||||||
from deluge.core.authmanager import AuthManager
|
from deluge.core.authmanager import AuthManager
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
|
|
||||||
from deluge.log import LOG as log
|
|
||||||
|
|
||||||
STATUS_KEYS = ['active_time', 'compact', 'distributed_copies', 'download_payload_rate', 'eta',
|
STATUS_KEYS = ['active_time', 'compact', 'distributed_copies', 'download_payload_rate', 'eta',
|
||||||
'file_priorities', 'file_progress', 'files', 'hash', 'is_auto_managed', 'is_seed', 'max_connections',
|
'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',
|
'max_download_speed', 'max_upload_slots', 'max_upload_speed', 'message', 'move_on_completed',
|
||||||
|
@ -26,8 +26,11 @@
|
|||||||
from deluge.log import LOG as log
|
from deluge.log import LOG as log
|
||||||
|
|
||||||
# Install the twisted reactor
|
# Install the twisted reactor
|
||||||
from twisted.internet import gtk2reactor
|
try:
|
||||||
reactor = gtk2reactor.install()
|
from twisted.internet import gtk2reactor
|
||||||
|
reactor = gtk2reactor.install()
|
||||||
|
except ImportError:
|
||||||
|
log.error("You must install python-twisted")
|
||||||
|
|
||||||
import gobject
|
import gobject
|
||||||
import gettext
|
import gettext
|
||||||
|
Loading…
x
Reference in New Issue
Block a user