summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2016-06-29 23:40:25 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2016-07-19 15:20:38 +0100
commit852b51f224ef47a1b658dd9e24ba04171dd0e940 (patch)
tree13867f5fbea4266645ba5fb3ff04f251d1ffe12d
parent492ad079654ef88648b9107602a217abf68e9edb (diff)
downloaddeluge-852b51f224ef47a1b658dd9e24ba04171dd0e940.tar.gz
deluge-852b51f224ef47a1b658dd9e24ba04171dd0e940.tar.bz2
deluge-852b51f224ef47a1b658dd9e24ba04171dd0e940.zip
[#2852] Set maximum supported libtorrent version to 1.0.x
-rw-r--r--deluge/_libtorrent.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/deluge/_libtorrent.py b/deluge/_libtorrent.py
index e68e53580..e2818df80 100644
--- a/deluge/_libtorrent.py
+++ b/deluge/_libtorrent.py
@@ -46,11 +46,17 @@ supports.
"""
REQUIRED_VERSION = "0.14.9.0"
+# The first major version (and all subsequent ones) to be unsupported.
+UNSUPPORTED_VERSION = "1.1.0.0"
+
def check_version(lt):
from deluge.common import VersionSplit
- if VersionSplit(lt.version) < VersionSplit(REQUIRED_VERSION):
- raise ImportError("This version of Deluge requires libtorrent >=%s!" % REQUIRED_VERSION)
+ if (VersionSplit(lt.version) < VersionSplit(REQUIRED_VERSION) or
+ VersionSplit(lt.version) >= VersionSplit(UNSUPPORTED_VERSION)):
+ raise ImportError("This version of Deluge requires libtorrent >=%s and not >= %s."
+ % (REQUIRED_VERSION, UNSUPPORTED_VERSION))
+
try:
import deluge.libtorrent as lt