]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix function parsing the kernel version
authorSimon Pasquier <simon.pasquier@bull.net>
Tue, 1 Apr 2014 13:55:55 +0000 (15:55 +0200)
committerSimon Pasquier <simon.pasquier@bull.net>
Tue, 1 Apr 2014 14:01:46 +0000 (16:01 +0200)
Change-Id: Id56efb476144a18cd9eb7279bc0f602760a86173
Closes-Bug: #1300808

neutron/agent/linux/ovs_lib.py

index 7cdb6f4dc702e0d26b127fd2e3ea800aaa2cfb3a..e1172234f8f2677280442914f949684812e84ff7 100644 (file)
@@ -484,7 +484,8 @@ def get_installed_kernel_version():
     try:
         cmd = utils.execute(args)
         for line in cmd.split('\n'):
-            return str(re.findall("\d+\.\d+\.\d+", line))
+            ver = re.findall("\d+\.\d+\.\d+", line)
+            return ver[0]
     except Exception:
         LOG.exception(_("Unable to retrieve installed Linux kernel version."))