Bug in comparison of VersionSplits -> deluge/common.py

Suggestions and discussion of future versions
Post Reply
anardil
New User
New User
Posts: 4
Joined: Tue Apr 13, 2010 7:45 pm

Bug in comparison of VersionSplits -> deluge/common.py

Post by anardil »

When evaluating the version comparison of libtorrent version 0.14.10.0 with the required one by deluge 0.14.9.0, the string comparison evaluates to false for:

0.14.10.0 >= 0.14.9.0

This leads to a risen Error at _libtorrent.py:53
The attached patch fixes it by comparing the integer converted subparts of the versionstring.

Maybe you can fix this in a later version.
Attachments
Patch.tar
Fix vor VersionSplit
(10 KiB) Downloaded 189 times
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Bug in comparison of VersionSplits -> deluge/common.py

Post by Cas »

what version of deluge is this for because i am sure this was fixed in 1.2.3
anardil
New User
New User
Posts: 4
Joined: Tue Apr 13, 2010 7:45 pm

Re: Bug in comparison of VersionSplits -> deluge/common.py

Post by anardil »

I also checked that by checking out the latest version via git and there still was the problem in common.py
anardil
New User
New User
Posts: 4
Joined: Tue Apr 13, 2010 7:45 pm

Re: Bug in comparison of VersionSplits -> deluge/common.py

Post by anardil »

Oh by the way the link http://dev.deluge-torrent.org/browser to browse the source is not working.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Bug in comparison of VersionSplits -> deluge/common.py

Post by Cas »

I have tested with 1.2.3, there appears to be no problem here.

Code: Select all

>>> from deluge.common import VersionSplit
>>> VersionSplit("0.14.10.0") > VersionSplit("0.14.9.0")
True
anardil wrote:Oh by the way the link http://dev.deluge-torrent.org/browser to browse the source is not working.
Yep its a trac issue but you can still browse source here: http://git.deluge-torrent.org/
anardil
New User
New User
Posts: 4
Joined: Tue Apr 13, 2010 7:45 pm

Re: Bug in comparison of VersionSplits -> deluge/common.py

Post by anardil »

Damn I looked in the wrong place when inspecting the current common.py

As you say, its fixed in the initializer, sorry for the inconvenience.

I'm gonna upgrade to 1.2.3 as soon as possible (cool version number by the way ;-)
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Bug in comparison of VersionSplits -> deluge/common.py

Post by Cas »

i thought that might have happened, thats for the input thouigh, it is apreciated :)
Post Reply