fix version number assert error

This commit is contained in:
Zach Tibbitts 2007-07-23 21:21:36 +00:00
parent 5bcf5fbfac
commit 1a05d470a2
2 changed files with 6 additions and 3 deletions

View File

@ -35,8 +35,11 @@ PROGRAM_NAME = "Deluge"
PROGRAM_VERSION = "0.5.3"
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')
# the necessary substitutions are made at installation time

View File

@ -188,7 +188,7 @@ class Manager:
InvalidTorrentError)
# Start up the core
assert(len(version) == 5)
assert(len(version) == 4)
deluge_core.init(client_ID,
int(version[0]),
int(version[1]),