mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 18:08:39 +00:00
[#2852] Set maximum supported libtorrent version to 1.0.x
This commit is contained in:
parent
492ad07965
commit
852b51f224
1 changed files with 8 additions and 2 deletions
|
@ -46,11 +46,17 @@ supports.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
REQUIRED_VERSION = "0.14.9.0"
|
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):
|
def check_version(lt):
|
||||||
from deluge.common import VersionSplit
|
from deluge.common import VersionSplit
|
||||||
if VersionSplit(lt.version) < VersionSplit(REQUIRED_VERSION):
|
if (VersionSplit(lt.version) < VersionSplit(REQUIRED_VERSION) or
|
||||||
raise ImportError("This version of Deluge requires libtorrent >=%s!" % REQUIRED_VERSION)
|
VersionSplit(lt.version) >= VersionSplit(UNSUPPORTED_VERSION)):
|
||||||
|
raise ImportError("This version of Deluge requires libtorrent >=%s and not >= %s."
|
||||||
|
% (REQUIRED_VERSION, UNSUPPORTED_VERSION))
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue