Skip to contentSkip to conversation

KVM test: Fixing kvm release tag detection

PATCH Applied Lucas Meneghel Rodrigues 1 participant 2 messages Jul 6, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM test: Fixing kvm release tag detection

The recent sourceforge facelift/changes broke our ability to determine KVM release tags. This patch fixes up things.

---
 client/tests/kvm/kvm_utils.py |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
client/tests/kvm/kvm_utils.py +1 -5
index a37d322..b2b0d1a 100644
@@ -139,13 +139,9 @@ def get_latest_kvm_release_tag(release_dir):
         f = open(local_web_page, "r")
         data = f.read()
         f.close()
-        rx = re.compile("package_id=(\d+).*\>kvm\<", re.IGNORECASE)
+        rx = re.compile("kvm-(\d+).tar.gz", re.IGNORECASE)
         matches = rx.findall(data)
         package_id = matches[0]
-        #package_id = 209008
-        rx = re.compile("package_id=%s.*release_id=\d+\">(\d+)" % package_id, 
-                        re.IGNORECASE)
-        matches = rx.findall(data)
         return matches[0] # the first match contains the latest release tag
     except Exception, e:
         message = "Could not fetch latest KVM release tag: %s" % str(e)
Signature · 1 line
1.6.2.5
#1 lore raw
Quoted 2 lines · Lucas Meneghel Rodrigues

The recent sourceforge facelift/changes broke our ability to determine KVM release tags. This patch fixes up things.

Applied.

Quoted 24 lines
---
 client/tests/kvm/kvm_utils.py |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
client/tests/kvm/kvm_utils.py +1 -5
index a37d322..b2b0d1a 100644
@@ -139,13 +139,9 @@ def get_latest_kvm_release_tag(release_dir):
         f = open(local_web_page, "r")
         data = f.read()
         f.close()
-        rx = re.compile("package_id=(\d+).*\>kvm\<", re.IGNORECASE)
+        rx = re.compile("kvm-(\d+).tar.gz", re.IGNORECASE)
         matches = rx.findall(data)
         package_id = matches[0]
-        #package_id = 209008
-        rx = re.compile("package_id=%s.*release_id=\d+\">(\d+)" % package_id, 
-                        re.IGNORECASE)
-        matches = rx.findall(data)
         return matches[0] # the first match contains the latest release tag
     except Exception, e:
         message = "Could not fetch latest KVM release tag: %s" % str(e)