diff --git a/deluge/core/alertmanager.py b/deluge/core/alertmanager.py index 971170cf8..4bb5136c6 100644 --- a/deluge/core/alertmanager.py +++ b/deluge/core/alertmanager.py @@ -29,9 +29,12 @@ import gobject import deluge.component as component try: - import libtorrent as lt -except ImportError: import deluge.libtorrent as lt +except ImportError: + import libtorrent as lt + if not (libtorrent.version_major == 0 and libtorrent.version_minor == 14): + raise ImportError("This version of Deluge requires libtorrent 0.14!") + from deluge.log import LOG as log class AlertManager(component.Component): diff --git a/deluge/core/autoadd.py b/deluge/core/autoadd.py index 7831f67e3..66b977628 100644 --- a/deluge/core/autoadd.py +++ b/deluge/core/autoadd.py @@ -26,9 +26,12 @@ import os try: - import libtorrent as lt -except ImportError: import deluge.libtorrent as lt +except ImportError: + import libtorrent as lt + if not (libtorrent.version_major == 0 and libtorrent.version_minor == 14): + raise ImportError("This version of Deluge requires libtorrent 0.14!") + import deluge.component as component from deluge.configmanager import ConfigManager from deluge.log import LOG as log diff --git a/deluge/core/core.py b/deluge/core/core.py index 40a547dfa..7a27a831f 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -39,9 +39,12 @@ import threading import socket try: - import libtorrent as lt -except ImportError: import deluge.libtorrent as lt +except ImportError: + import libtorrent as lt + if not (libtorrent.version_major == 0 and libtorrent.version_minor == 14): + raise ImportError("This version of Deluge requires libtorrent 0.14!") + import deluge.configmanager import deluge.common diff --git a/deluge/core/oldstateupgrader.py b/deluge/core/oldstateupgrader.py index 65afecd0b..12342b475 100644 --- a/deluge/core/oldstateupgrader.py +++ b/deluge/core/oldstateupgrader.py @@ -30,9 +30,12 @@ import cPickle import shutil try: - import libtorrent as lt -except ImportError: import deluge.libtorrent as lt +except ImportError: + import libtorrent as lt + if not (libtorrent.version_major == 0 and libtorrent.version_minor == 14): + raise ImportError("This version of Deluge requires libtorrent 0.14!") + from deluge.configmanager import ConfigManager import deluge.core.torrentmanager from deluge.log import LOG as log diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 52dc8303b..70431f3d5 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -28,9 +28,12 @@ import os try: - import libtorrent as lt -except ImportError: import deluge.libtorrent as lt +except ImportError: + import libtorrent as lt + if not (libtorrent.version_major == 0 and libtorrent.version_minor == 14): + raise ImportError("This version of Deluge requires libtorrent 0.14!") + import deluge.common import deluge.component as component from deluge.configmanager import ConfigManager diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 5aa352709..7cf7b5d97 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -33,9 +33,12 @@ import time import gobject try: - import libtorrent as lt -except ImportError: import deluge.libtorrent as lt +except ImportError: + import libtorrent as lt + if not (libtorrent.version_major == 0 and libtorrent.version_minor == 14): + raise ImportError("This version of Deluge requires libtorrent 0.14!") + import deluge.common import deluge.component as component