mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +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"
|
||||
|
||||
try:
|
||||
import deluge.libtorrent as lt
|
||||
except ImportError:
|
||||
import libtorrent as lt
|
||||
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)
|
||||
|
||||
try:
|
||||
import deluge.libtorrent as lt
|
||||
check_version(lt)
|
||||
except ImportError:
|
||||
import libtorrent as lt
|
||||
check_version(lt)
|
Loading…
Add table
Reference in a new issue