[Pkg-privacy-commits] [tails-installer] 12/40: Fix a bug in the get_fedora_releases function to properly fetch the latest releases

anonym anonym-tails-guest at moszumanska.debian.org
Thu Jan 12 15:15:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

anonym-tails-guest pushed a commit to annotated tag 3.13.1
in repository tails-installer.

commit 560511bbfbc6a05f5ce26618f45a26088b6c2c69
Author: Luke Macken <lmacken at redhat.com>
Date:   Sat Sep 20 13:03:19 2014 -0600

    Fix a bug in the get_fedora_releases function to properly fetch the latest releases
---
 liveusb/releases.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/liveusb/releases.py b/liveusb/releases.py
index db37385..3522533 100644
--- a/liveusb/releases.py
+++ b/liveusb/releases.py
@@ -57,7 +57,9 @@ def get_fedora_releases():
     fedora_releases = []
     try:
         html = urlread(FEDORA_RELEASES)
-        for release in re.findall(r'<a href="(\d+)/">', html)[-2:][::-1]:
+        versions = re.findall(r'<a href="(\d+)/">', html)
+        latest = sorted([int(v) for v in versions], reverse=True)[0:2]
+        for release in latest:
             for arch in ARCHES:
                 arch_url = FEDORA_RELEASES + '%s/Live/%s/' % (release, arch)
                 try:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list