[#2730] Fix Deluge dev versions not starting
Change to use the VersionSplit class and fix code there.
This commit is contained in:
parent
16faa26124
commit
630aa730d5
|
@ -695,7 +695,7 @@ class VersionSplit(object):
|
||||||
def __init__(self, ver):
|
def __init__(self, ver):
|
||||||
ver = ver.lower()
|
ver = ver.lower()
|
||||||
vs = ver.replace("_", "-").split("-")
|
vs = ver.replace("_", "-").split("-")
|
||||||
self.version = [int(x) for x in vs[0].split(".")]
|
self.version = [int(x) for x in vs[0].split(".") if x.isdigit()]
|
||||||
self.suffix = None
|
self.suffix = None
|
||||||
self.dev = False
|
self.dev = False
|
||||||
if len(vs) > 1:
|
if len(vs) > 1:
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Core(component.Component):
|
||||||
log.info("Starting libtorrent %s session..", lt.version)
|
log.info("Starting libtorrent %s session..", lt.version)
|
||||||
|
|
||||||
# Create the client fingerprint
|
# Create the client fingerprint
|
||||||
version = [int(value.split("-")[0]) for value in deluge.common.get_version().split(".")]
|
version = deluge.common.VersionSplit(deluge.common.get_version()).version
|
||||||
while len(version) < 4:
|
while len(version) < 4:
|
||||||
version.append(0)
|
version.append(0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue