mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
fix version number assert error
This commit is contained in:
parent
5bcf5fbfac
commit
1a05d470a2
2 changed files with 6 additions and 3 deletions
|
@ -35,8 +35,11 @@ PROGRAM_NAME = "Deluge"
|
||||||
PROGRAM_VERSION = "0.5.3"
|
PROGRAM_VERSION = "0.5.3"
|
||||||
|
|
||||||
CLIENT_CODE = "DE"
|
CLIENT_CODE = "DE"
|
||||||
CLIENT_VERSION = "".join(PROGRAM_VERSION.split('.'))+"0"*(4 - len(PROGRAM_VERSION.split('.')))
|
CLIENT_VERSION = ''.join(PROGRAM_VERSION.split('.'))
|
||||||
|
if len(CLIENT_VERSION) < 4:
|
||||||
|
CLIENT_VERSION = CLIENT_VERSION + '0'*(4-len(CLIENT_VERSION))
|
||||||
|
elif len(CLIENT_VERSION) > 4:
|
||||||
|
CLIENT_VERSION = CLIENT_VERSION[:4]
|
||||||
CONFIG_DIR = xdg.BaseDirectory.save_config_path('deluge')
|
CONFIG_DIR = xdg.BaseDirectory.save_config_path('deluge')
|
||||||
|
|
||||||
# the necessary substitutions are made at installation time
|
# the necessary substitutions are made at installation time
|
||||||
|
|
|
@ -188,7 +188,7 @@ class Manager:
|
||||||
InvalidTorrentError)
|
InvalidTorrentError)
|
||||||
|
|
||||||
# Start up the core
|
# Start up the core
|
||||||
assert(len(version) == 5)
|
assert(len(version) == 4)
|
||||||
deluge_core.init(client_ID,
|
deluge_core.init(client_ID,
|
||||||
int(version[0]),
|
int(version[0]),
|
||||||
int(version[1]),
|
int(version[1]),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue