[#2730] Fix Deluge dev versions not starting

Change to use the VersionSplit class and fix code there.
This commit is contained in:
Calum Lind 2015-08-14 00:20:02 +01:00
parent 16faa26124
commit 630aa730d5
2 changed files with 2 additions and 2 deletions

View File

@ -695,7 +695,7 @@ class VersionSplit(object):
def __init__(self, ver):
ver = ver.lower()
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.dev = False
if len(vs) > 1:

View File

@ -80,7 +80,7 @@ class Core(component.Component):
log.info("Starting libtorrent %s session..", lt.version)
# 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:
version.append(0)