mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
change the _libtorrent module so that the included libtorrent is checked for the correct version also (incase people have been following svn and the version requirement changes)
This commit is contained in:
parent
9fafa31afe
commit
6b13eeeb38
1 changed files with 8 additions and 4 deletions
|
@ -47,10 +47,14 @@ supports.
|
||||||
|
|
||||||
REQUIRED_VERSION = "0.14.5.0"
|
REQUIRED_VERSION = "0.14.5.0"
|
||||||
|
|
||||||
try:
|
def check_version(LT):
|
||||||
import deluge.libtorrent as lt
|
|
||||||
except ImportError:
|
|
||||||
import libtorrent as 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):
|
||||||
raise ImportError("This version of Deluge requires libtorrent >=%s!" % REQUIRED_VERSION)
|
raise ImportError("This version of Deluge requires libtorrent >=%s!" % REQUIRED_VERSION)
|
||||||
|
|
||||||
|
try:
|
||||||
|
import deluge.libtorrent as lt
|
||||||
|
check_version(lt)
|
||||||
|
except ImportError:
|
||||||
|
import libtorrent as lt
|
||||||
|
check_version(lt)
|
Loading…
Add table
Add a link
Reference in a new issue