Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Fix update version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
remyroy committed Feb 9, 2016
1 parent f4fa8b1 commit b2cc602
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cddagl/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,12 @@ def lv_http_finished(self):
for release in document.getroot().cssselect('div.release.label-latest'):
latest_version = None
version_text = None
for index, span in enumerate(
release.cssselect('ul.tag-references li:first-child span')):
if index == 1:
version_text = span.text
if version_text.startswith('v'):
version_text = version_text[1:]
latest_version = LooseVersion(version_text)
for span in release.cssselect('ul.tag-references li:first-child '
'span'):
version_text = span.text
if version_text.startswith('v'):
version_text = version_text[1:]
latest_version = LooseVersion(version_text)

if latest_version is not None:
current_version = LooseVersion(version)
Expand Down

0 comments on commit b2cc602

Please sign in to comment.